:root {
    color-scheme: light;
    --milk: #f4efe5;
    --cream: #d7c9ad;
    --warm: #aa875e;
    --wood: #6e5237;
    --ink: #241f19;
    --muted: #756a5d;
    --line: rgba(80, 61, 41, 0.18);
    --white: #fffaf1;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--milk);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background: #17130f;
}

.hero-media,
.hero-media::before {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.hero-media::before {
    content: "";
    background: var(--hero-image, url("/static/client/assets/studio-3.jpeg")) center / cover no-repeat;
    transform: scale(1.03);
}

.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(18, 14, 10, 0.54), rgba(18, 14, 10, 0.34) 42%, rgba(18, 14, 10, 0.76)),
        radial-gradient(circle at center, rgba(244, 239, 229, 0.08), transparent 50%);
}

.hero-menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 26px 20px;
}

.hero-site-actions {
    position: absolute;
    top: 18px;
    right: clamp(16px, 4vw, 42px);
    color: var(--white);
}

.hero-menu nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(18px, 4vw, 46px);
    color: rgba(255, 250, 241, 0.82);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-content {
    align-self: center;
    justify-self: center;
    width: min(760px, calc(100% - 40px));
    padding: 96px 0 64px;
    color: var(--white);
    text-align: center;
}

.brand-mini {
    margin: 0 0 4px;
    color: rgba(255, 250, 241, 0.82);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(21px, 3vw, 34px);
    font-style: italic;
}

h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(78px, 15vw, 188px);
    font-weight: 400;
    line-height: 0.82;
}

.hero-subtitle {
    margin: 18px 0 0;
    color: rgba(255, 250, 241, 0.9);
    font-size: clamp(17px, 2.2vw, 26px);
}

.hero-description {
    max-width: 620px;
    margin: 28px auto 0;
    color: rgba(255, 250, 241, 0.82);
    font-size: 17px;
    line-height: 1.75;
}

.hero-actions {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-top: 36px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(360px, 100%);
    min-height: 52px;
    border-radius: 8px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-button.primary {
    background: var(--white);
    color: var(--ink);
}

.hero-button.secondary {
    border: 1px solid rgba(255, 250, 241, 0.52);
    background: rgba(255, 250, 241, 0.12);
    color: var(--white);
}

.studio-section,
.catalog-section {
    padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 72px);
}

.studio-section {
    display: grid;
    align-content: center;
    min-height: 100vh;
    padding-top: clamp(32px, 5vw, 64px);
    padding-bottom: clamp(32px, 5vw, 64px);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading p {
    margin: 0 0 10px;
    color: var(--warm);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 6vw, 76px);
    font-weight: 400;
}

.section-heading span {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.studio-address {
    display: inline-block;
    margin-top: 12px;
    border-bottom: 1px solid rgba(170, 135, 94, 0.45);
    color: var(--muted);
    line-height: 1.6;
    transition: color 0.22s ease, border-color 0.22s ease;
}

.studio-address:hover {
    border-color: var(--warm);
    color: var(--wood);
}

.studio-gallery {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(86px, 8vw);
    gap: clamp(10px, 1.2vw, 16px);
    min-height: clamp(300px, 44vh, 480px);
}

.studio-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 18px 50px rgba(36, 31, 25, 0.12);
    cursor: zoom-in;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.studio-gallery img:hover {
    transform: translateY(-4px) scale(1.01);
    filter: saturate(1.05);
}

.studio-gallery img:nth-child(1) {
    grid-column: 1 / span 6;
    grid-row: 1 / span 4;
}

.studio-gallery img:nth-child(2) {
    grid-column: 7 / span 3;
    grid-row: 1 / span 2;
}

.studio-gallery img:nth-child(3) {
    grid-column: 10 / span 3;
    grid-row: 1 / span 2;
}

.studio-gallery img:nth-child(4) {
    grid-column: 7 / span 4;
    grid-row: 3 / span 2;
}

.studio-gallery img:nth-child(5) {
    grid-column: 11 / span 2;
    grid-row: 3 / span 2;
}

.studio-gallery.photos-1 {
    min-height: clamp(300px, 44vh, 480px);
}

.studio-gallery.photos-1 img:nth-child(1) {
    grid-column: 2 / span 10;
    grid-row: 1 / span 4;
}

.studio-gallery.photos-2 img:nth-child(1) {
    grid-column: 1 / span 7;
    grid-row: 1 / span 4;
}

.studio-gallery.photos-2 img:nth-child(2) {
    grid-column: 8 / span 5;
    grid-row: 1 / span 4;
}

.studio-gallery.photos-3 img:nth-child(1) {
    grid-column: 1 / span 7;
    grid-row: 1 / span 4;
}

.studio-gallery.photos-3 img:nth-child(2) {
    grid-column: 8 / span 5;
    grid-row: 1 / span 2;
}

.studio-gallery.photos-3 img:nth-child(3) {
    grid-column: 8 / span 5;
    grid-row: 3 / span 2;
}

.studio-gallery.photos-4 img:nth-child(1) {
    grid-column: 1 / span 6;
    grid-row: 1 / span 4;
}

.studio-gallery.photos-4 img:nth-child(2) {
    grid-column: 7 / span 3;
    grid-row: 1 / span 2;
}

.studio-gallery.photos-4 img:nth-child(3) {
    grid-column: 10 / span 3;
    grid-row: 1 / span 2;
}

.studio-gallery.photos-4 img:nth-child(4) {
    grid-column: 7 / span 6;
    grid-row: 3 / span 2;
}

.catalog-section {
    background: #ebe2d2;
}

.catalog-list {
    display: grid;
    gap: 18px;
}

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

.service-card {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 360px;
    overflow: hidden;
    border-radius: 8px;
    padding: 24px;
    color: var(--white);
    isolation: isolate;
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 15, 10, 0.08), rgba(20, 15, 10, 0.78));
}

.service-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.service-card:hover img {
    transform: scale(1.04);
}

.service-card span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 3vw, 42px);
}

.service-card p {
    max-width: 420px;
    margin: 10px 0 0;
    color: rgba(255, 250, 241, 0.82);
    line-height: 1.5;
}

.category-block {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.category-title {
    margin: 0 0 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
}

.massage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.massage-card {
    display: grid;
    gap: 12px;
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 250, 241, 0.62);
    padding: 22px;
}

.massage-card h3 {
    margin: 0;
    font-size: 21px;
}

.massage-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.massage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--wood);
    font-weight: 800;
}

.empty-catalog {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    color: var(--muted);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding: 24px clamp(20px, 5vw, 72px);
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(19, 15, 11, 0.86);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: min(1120px, calc(100vw - 96px));
    max-height: calc(100vh - 96px);
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.lightbox button {
    position: absolute;
    border: 1px solid rgba(255, 250, 241, 0.35);
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.12);
    color: var(--white);
    font: inherit;
    cursor: pointer;
}

.lightbox-close {
    top: 22px;
    right: 22px;
    width: 42px;
    height: 42px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 22px;
}

.lightbox-next {
    right: 22px;
}

@media (max-width: 820px) {
    .hero-menu {
        justify-content: flex-start;
        padding-right: 16px;
    }

    .hero-menu nav {
        max-width: calc(100% - 60px);
        justify-content: flex-start;
        gap: 14px;
    }

    .hero-site-actions {
        top: 14px;
        right: 14px;
        width: auto;
        gap: 8px;
    }

    .hero-site-actions > a {
        display: none;
    }

    .massage-grid,
    .service-grid {
        grid-template-columns: 1fr;
    }

    .studio-section {
        min-height: 0;
    }

    .studio-gallery {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(76vw, 1fr);
        grid-template-columns: none;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x mandatory;
        min-height: 0;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .studio-gallery img,
    .studio-gallery.photos-1 img:nth-child(1),
    .studio-gallery.photos-2 img:nth-child(1),
    .studio-gallery.photos-2 img:nth-child(2),
    .studio-gallery.photos-3 img:nth-child(1),
    .studio-gallery.photos-3 img:nth-child(2),
    .studio-gallery.photos-3 img:nth-child(3),
    .studio-gallery.photos-4 img:nth-child(1),
    .studio-gallery.photos-4 img:nth-child(2),
    .studio-gallery.photos-4 img:nth-child(3),
    .studio-gallery.photos-4 img:nth-child(4),
    .studio-gallery img:nth-child(1),
    .studio-gallery img:nth-child(2),
    .studio-gallery img:nth-child(3),
    .studio-gallery img:nth-child(4),
    .studio-gallery img:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 4 / 3;
        height: auto;
        scroll-snap-align: center;
    }

    .studio-gallery img:first-child {
        aspect-ratio: 4 / 3;
    }

    .site-footer {
        flex-direction: column;
    }
}
