/* ==========================================================================
   Modern Chic Nail Studio — Unified Hero + Portfolio Wave
   The gallery and headline share one video-backed editorial canvas.
   ========================================================================== */

.mc-hero {
    --mc-video-x: 0px;
    --mc-video-y: 0px;
    --mc-atmo-x: 0px;
    --mc-atmo-y: 0px;
    --mc-glow-x: 0%;
    --mc-glow-y: 0%;
    position: relative;
    min-height: min(980px, calc(100svh - 92px));
    padding: clamp(4.5rem, 8vh, 7.5rem) 0 clamp(4rem, 7vh, 6.5rem) !important;
    overflow: hidden;
    isolation: isolate;
    background: #09070a;
    color: var(--text-color);
}

.mc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(6, 5, 7, 0.48) 0%, rgba(9, 7, 10, 0.13) 31%, rgba(9, 7, 10, 0.58) 72%, #09070a 100%),
        radial-gradient(ellipse 48% 44% at calc(22% + var(--mc-glow-x)) calc(20% + var(--mc-glow-y)), rgba(165, 142, 98, 0.22), transparent 72%),
        radial-gradient(ellipse 54% 50% at calc(84% - var(--mc-glow-x)) calc(74% - var(--mc-glow-y)), rgba(74, 72, 67, 0.34), transparent 74%);
    pointer-events: none;
}

.mc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 7;
    opacity: 0.16;
    pointer-events: none;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

.mc-hero .hero-video-wrap {
    position: absolute;
    inset: -3%;
    width: 106%;
    height: 106%;
    z-index: 0;
    transform: translate3d(
        var(--mc-video-x),
        var(--mc-video-y),
        0
    ) scale(1.02);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-hero .hero-video-wrap::after {
    background:
        linear-gradient(180deg, rgba(7, 6, 8, 0.62) 0%, rgba(14, 10, 14, 0.24) 42%, rgba(7, 6, 8, 0.72) 100%),
        radial-gradient(ellipse 62% 54% at 18% 16%, rgba(165, 142, 98, 0.30), transparent 72%),
        radial-gradient(ellipse 62% 56% at 82% 80%, rgba(61, 60, 56, 0.52), transparent 75%) !important;
}

.mc-hero .hero-video {
    filter: saturate(0.76) contrast(1.04) brightness(0.69);
}

.mc-hero__atmosphere {
    position: absolute;
    z-index: 2;
    inset: 8% 7% auto;
    height: 53%;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, rgba(245, 236, 223, 0.09), transparent 28%),
        radial-gradient(ellipse at 50% 54%, rgba(7, 6, 8, 0.1), rgba(7, 6, 8, 0.52) 71%, transparent 74%);
    filter: blur(18px);
    transform: translate3d(
        var(--mc-atmo-x),
        var(--mc-atmo-y),
        0
    );
}

.mc-hero__content {
    position: relative;
    z-index: 5;
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s ease 0.12s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}

.mc-hero.is-ready .mc-hero__content {
    opacity: 1;
    transform: translateY(0);
}

.mc-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: clamp(1rem, 2vh, 1.45rem);
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--secondary-soft);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.mc-hero__eyebrow::before,
.mc-hero__eyebrow::after {
    content: "";
    width: clamp(24px, 3vw, 44px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.mc-hero__title {
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.12em;
    font-family: "Fraunces", "Cormorant Garamond", serif;
    font-variation-settings: "opsz" 144, "SOFT" 36, "WONK" 0;
    font-size: clamp(4rem, 8.7vw, 8.7rem);
    font-weight: 380;
    letter-spacing: -0.052em;
    line-height: 0.88;
    color: #f7efe7 !important;
    text-wrap: balance;
    text-shadow:
        0 3px 28px rgba(0, 0, 0, 0.58),
        0 0 72px rgba(165, 142, 98, 0.12);
}

.mc-hero__title-anchor {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mc-hero__word-stage {
    position: relative;
    display: inline-grid;
    align-items: baseline;
    flex: 0 0 var(--mc-word-width, 5.08em);
    width: var(--mc-word-width, 5.08em);
    min-width: 0;
    height: 1.18em;
    padding: 0.08em 0.08em 0.22em;
    margin: -0.08em -0.08em -0.22em;
    overflow: hidden;
    text-align: left;
    vertical-align: baseline;
    isolation: isolate;
    transition: width 0.68s cubic-bezier(0.16, 1, 0.3, 1),
                flex-basis 0.68s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-hero__word-stage::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0.12em;
    bottom: 0.055em;
    width: 72%;
    height: 1px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, transparent, rgba(216, 202, 169, 0.72), transparent);
    filter: drop-shadow(0 0 7px rgba(200, 184, 146, 0.36));
}

.mc-hero__word-stage.is-changing::after {
    animation: mc-word-shimmer 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-hero__word {
    display: inline-block;
    grid-area: 1 / 1;
    width: max-content;
    padding-right: 0.055em;
    padding-bottom: 0.1em;
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
    font-style: italic;
    letter-spacing: -0.035em;
    color: #c8b892;
    font-variation-settings: normal;
    transform-origin: 30% 60%;
    will-change: transform, opacity, filter;
}

.mc-hero__word.is-leaving {
    animation: mc-word-leave 0.48s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.mc-hero__word.is-entering {
    animation: mc-word-enter 0.68s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mc-word-leave {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -0.36em, 0) skewX(-3deg);
        filter: blur(8px);
    }
}

@keyframes mc-word-enter {
    0% {
        opacity: 0;
        transform: translate3d(0, 0.34em, 0) skewX(4deg);
        filter: blur(9px);
    }
    58% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) skewX(0);
        filter: blur(0);
    }
}

@keyframes mc-word-shimmer {
    0% {
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left;
    }
    38% {
        opacity: 0.72;
        transform: scaleX(1);
        transform-origin: left;
    }
    72% {
        opacity: 0.36;
        transform: scaleX(1);
        transform-origin: right;
    }
    100% {
        opacity: 0;
        transform: scaleX(0);
        transform-origin: right;
    }
}

.mc-hero__sub {
    max-width: 590px;
    margin: clamp(1.35rem, 2.7vh, 2rem) auto 0;
    font-family: "Inter Tight", "Inter", sans-serif;
    font-size: clamp(0.94rem, 1.25vw, 1.08rem);
    line-height: 1.72;
    color: rgba(245, 236, 223, 0.72) !important;
    text-wrap: balance;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.mc-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.72rem;
    margin-top: clamp(1.7rem, 3.2vh, 2.35rem);
    min-width: 218px;
    padding: 1rem 1.9rem;
    border: 1px solid rgba(216, 202, 169, 0.78);
    border-radius: 999px;
    background: rgba(165, 142, 98, 0.94);
    color: #171017 !important;
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.34),
        0 0 36px rgba(165, 142, 98, 0.18);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.26em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none !important;
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.mc-hero__cta:hover,
.mc-hero__cta:focus-visible {
    transform: translateY(-3px);
    background: #c8b892;
    color: #171017 !important;
    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.42),
        0 0 48px rgba(165, 142, 98, 0.28);
}

.mc-hero__cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.mc-hero__cta:hover svg { transform: translateX(4px); }

/* ---------- The gallery wave inside the hero ---------- */
.mc-wave {
    position: relative;
    z-index: 4;
    margin-top: clamp(1.3rem, 3.5vh, 3rem);
    padding: 1rem 0 0;
    opacity: 0;
    transform: translateY(42px);
    transition: opacity 1.15s ease 0.28s, transform 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.28s;
}

.mc-hero.is-ready .mc-wave {
    opacity: 1;
    transform: translateY(0);
}

.mc-wave__glow {
    position: absolute;
    z-index: -1;
    top: 24%;
    left: 50%;
    width: min(1060px, 90vw);
    height: 58%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(165, 142, 98, 0.15), rgba(11, 10, 9, 0.14) 46%, transparent 72%);
    filter: blur(28px);
    pointer-events: none;
}

.mc-wave__viewport {
    position: relative;
    width: 100%;
    min-height: clamp(310px, 35vw, 430px);
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.mc-wave__viewport:active { cursor: grabbing; }

.mc-wave__track {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.25vw, 22px);
    width: max-content;
    padding: clamp(42px, 5vw, 68px) 0 clamp(34px, 4vw, 56px);
    will-change: transform;
    transform-style: preserve-3d;
}

.mc-card {
    --mc-wave-y: 0px;
    --mc-wave-r: 0deg;
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: clamp(174px, 13.5vw, 238px);
    aspect-ratio: 0.76;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(245, 236, 223, 0.14);
    border-radius: clamp(12px, 1.1vw, 18px);
    background: #1b151c;
    color: var(--text-color);
    box-shadow:
        0 30px 62px -24px rgba(0, 0, 0, 0.84),
        0 0 0 1px rgba(245, 236, 223, 0.04) inset,
        0 0 26px rgba(165, 142, 98, 0.08);
    transform: translate3d(0, var(--mc-wave-y), 0) rotate(var(--mc-wave-r));
    transform-origin: 50% 58%;
    will-change: transform;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition:
        filter 0.35s ease,
        box-shadow 0.45s ease,
        border-color 0.35s ease;
}

.mc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%, transparent 58%, rgba(5, 4, 6, 0.78) 100%),
        radial-gradient(circle at 32% 16%, rgba(255, 255, 255, 0.08), transparent 32%);
    pointer-events: none;
}

.mc-card:hover,
.mc-card:focus-visible {
    z-index: 30;
    outline: none;
    border-color: rgba(216, 202, 169, 0.62);
    filter: brightness(1.08) saturate(1.06);
    box-shadow:
        0 40px 82px -20px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(245, 236, 223, 0.08) inset,
        0 0 46px rgba(165, 142, 98, 0.22);
    transform: translate3d(0, calc(var(--mc-wave-y) - 18px), 0) rotate(0deg) scale(1.045);
}

.mc-card__media {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}

.mc-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.015);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
}

.mc-card:hover .mc-card__img,
.mc-card:focus-visible .mc-card__img {
    transform: scale(1.085);
}

.mc-card__number {
    position: absolute;
    z-index: 5;
    top: 13px;
    right: 14px;
    font-family: "Fraunces", serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 248, 240, 0.72);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.88);
}

.mc-card__caption {
    position: absolute;
    z-index: 5;
    left: 15px;
    right: 15px;
    bottom: 15px;
    display: block;
    text-align: left;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.mc-card:hover .mc-card__caption,
.mc-card:focus-visible .mc-card__caption {
    opacity: 1;
    transform: translateY(0);
}

.mc-card__caption-label,
.mc-card__caption-title {
    display: block;
}

.mc-card__caption-label {
    margin-bottom: 3px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #d3c29d;
}

.mc-card__caption-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.16rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.1;
    color: #fff7ef;
}

.mc-wave__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1320px, calc(100% - 48px));
    margin: -0.15rem auto 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.59rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    line-height: 1.3;
    text-transform: uppercase;
    color: rgba(245, 236, 223, 0.42);
}

.mc-wave__meta span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.mc-wave__meta span:last-child::before {
    content: "";
    width: 32px;
    height: 1px;
    background: rgba(165, 142, 98, 0.64);
}

.mc-hero__scroll {
    position: absolute;
    z-index: 6;
    left: 28px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(245, 236, 223, 0.38);
}

.mc-hero__scroll i {
    position: relative;
    display: block;
    width: 46px;
    height: 1px;
    overflow: hidden;
    background: rgba(245, 236, 223, 0.16);
}

.mc-hero__scroll i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary);
    transform: translateX(-105%);
    animation: mc-scroll-line 2.4s ease-in-out infinite;
}

@keyframes mc-scroll-line {
    0%, 12% { transform: translateX(-105%); }
    55% { transform: translateX(0); }
    88%, 100% { transform: translateX(105%); }
}

/* ---------- Lightbox ---------- */
.mc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 6, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mc-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.mc-lightbox__img {
    max-width: min(92vw, 720px);
    max-height: 86vh;
    border-radius: 14px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.76), 0 0 80px rgba(165, 142, 98, 0.16);
    transform: scale(0.94);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-lightbox.is-open .mc-lightbox__img { transform: scale(1); }

.mc-lightbox__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(245, 236, 223, 0.18);
    border-radius: 50%;
    background: rgba(245, 236, 223, 0.08);
    color: var(--text-color);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.mc-lightbox__close:hover,
.mc-lightbox__close:focus-visible {
    outline: none;
    transform: rotate(90deg);
    background: var(--primary);
    color: var(--ink);
}

.mc-lightbox__close svg { width: 18px; height: 18px; }

.mc-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    font-family: "Cormorant Garamond", serif;
    font-size: 1.18rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-color);
    white-space: nowrap;
}

body.mc-no-scroll { overflow: hidden; }

.mc-hero + .section::before,
.mc-hero + .section::after {
    display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .mc-hero {
        min-height: 0;
        padding-top: clamp(4rem, 8vh, 5.5rem) !important;
        padding-bottom: 4.4rem !important;
    }

    .mc-hero__title {
        font-size: clamp(3.8rem, 13vw, 6rem);
        line-height: 0.93;
        flex-wrap: wrap;
        gap: 0;
    }

    .mc-hero__title-anchor,
    .mc-hero__word-stage {
        flex-basis: 100%;
    }

    .mc-hero__word-stage {
        display: grid;
        justify-items: center;
        width: 100%;
        min-width: 100%;
        height: 1.28em;
        padding: 0.06em 0.16em 0.24em;
        margin: -0.06em -0.16em -0.24em;
        overflow: visible;
        text-align: center;
        transition: none;
    }

    .mc-hero__word-stage.is-changing {
        overflow: hidden;
    }

    .mc-hero__word {
        justify-self: center;
    }

    .mc-wave {
        margin-top: 1.2rem;
    }

    .mc-wave__viewport {
        min-height: clamp(290px, 52vw, 380px);
    }

    .mc-card {
        width: clamp(166px, 25vw, 212px);
    }

    .mc-wave__meta {
        width: calc(100% - 36px);
    }

    .mc-hero__scroll { display: none; }
}

@media (max-width: 575.98px) {
    .mc-hero {
        padding-top: 3.4rem !important;
        padding-bottom: 3.5rem !important;
    }

    .mc-hero__content {
        width: min(100% - 28px, 520px);
    }

    .mc-hero__eyebrow {
        font-size: 0.58rem;
        letter-spacing: 0.27em;
    }

    .mc-hero__title {
        width: 100%;
        font-size: clamp(3.15rem, 14.2vw, 4.35rem);
        letter-spacing: -0.045em;
        line-height: 0.9;
    }

    .mc-hero__title-anchor {
        line-height: 0.86;
    }

    .mc-hero__word-stage {
        margin-top: 0.08em;
    }

    .mc-hero__sub {
        max-width: 345px;
        font-size: 0.92rem;
        line-height: 1.62;
    }

    .mc-hero__cta {
        min-width: 205px;
        padding: 0.95rem 1.5rem;
        font-size: 0.62rem;
    }

    .mc-wave {
        margin-top: 0.5rem;
    }

    .mc-wave__viewport {
        min-height: 300px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
    }

    .mc-wave__track {
        gap: 12px;
        padding-top: 48px;
        padding-bottom: 36px;
    }

    .mc-card {
        width: clamp(154px, 45vw, 184px);
        border-radius: 13px;
    }

    .mc-card__caption {
        opacity: 1;
        transform: none;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .mc-card__caption-label { font-size: 0.5rem; }
    .mc-card__caption-title { font-size: 1rem; }

    .mc-wave__meta {
        width: calc(100% - 28px);
        margin-top: -0.35rem;
        font-size: 0.5rem;
        letter-spacing: 0.18em;
    }

    .mc-wave__meta span:last-child::before { width: 20px; }
    .mc-lightbox__caption { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .mc-hero .hero-video-wrap,
    .mc-hero__content,
    .mc-wave,
    .mc-card,
    .mc-card__img,
    .mc-card__caption,
    .mc-hero__cta,
    .mc-hero__cta svg,
    .mc-lightbox,
    .mc-lightbox__img {
        transition: none !important;
    }

    .mc-hero__scroll i::after { animation: none; }

    .mc-hero__word-stage::after,
    .mc-hero__word.is-leaving,
    .mc-hero__word.is-entering {
        animation: none !important;
    }
}
