/* ==========================================================================
   Reset / Base
   ========================================================================== */
.cosmetology-page,
.cosmetology-page * {
    box-sizing: border-box;
}

.cosmetology-page {
    --color-primary: #f97c00;
    --color-primary-dark: #ff660c;
    --color-accent: #4fba31;
    --color-text: #5a4716;
    --color-muted: #656565;
    --color-border: #d9c9b9;
    --color-soft: #f4efea;
    --color-aftercare: #eda35f;
    --color-white: #fff;
    --shadow-card:
        0 4px 8px rgba(0, 0, 0, 0.02), 0 6px 12px rgba(0, 0, 0, 0.03);
    --shadow-button: 0 2px 3px #ccc, inset 0 -3px 0 rgba(141, 112, 35, 0.4);
    --font-base:
        "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
        sans-serif;
    --font-round: "Kosugi Maru", "Noto Sans JP", sans-serif;
    --container: 1060px;
    --container-wide: 1242px;
    --gutter: clamp(1rem, 4vw, 4rem);
    font-family: var(--font-base);
    color: var(--color-text);
    background: var(--color-white);
    margin-top: 40px;
    overflow-x: hidden;
    overflow-x: clip;
}

.cosmetology-page :where(h2, h3, p, ul, ol, figure) {
    margin: 0;
    padding: 0;
}

.cosmetology-page :where(ul, ol) {
    list-style: none;
}

.cosmetology-page img {
    display: block;
    max-width: 100%;
    height: auto;
}

.cosmetology-page a {
    color: inherit;
    text-decoration: none;
}

.cosmetology-page :where(a, button):focus-visible {
    outline: 3px solid rgba(249, 124, 0, 0.35);
    outline-offset: 4px;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.cosmetology-container {
    width: min(calc(100% - 2rem), var(--container));
    margin-inline: auto;
}

.cosmetology-section {
    padding: clamp(4.5rem, 8vw, 7.5rem) var(--gutter);
}

.cosmetology-section__button {
    margin-top: clamp(2rem, 4vw, 3.5rem);
    text-align: center;
}

/* ==========================================================================
   Components
   ========================================================================== */
.section-heading {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
}

.section-heading__en {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    color: var(--color-soft);
    font-family: var(--font-round);
    font-size: clamp(3.5rem, 8vw, 5.375rem);
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.section-heading--light .section-heading__en {
    color: var(--color-white);
}

.section-heading__mark {
    width: 37px;
    height: 23px;
    object-fit: contain;
}

.section-heading__title {
    color: var(--color-primary);
    font-family: var(--font-round);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    line-height: 1.45;
}

.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 280px);
    min-height: 55px;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    background: linear-gradient(
        170deg,
        #ff9c0e 11.888%,
        var(--color-primary-dark) 97.641%
    );
    box-shadow: var(--shadow-button);
    color: var(--color-white);
    font-family: var(--font-round);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.2;
    text-align: center;
    transition:
        transform 0.2s ease,
        filter 0.2s ease,
        box-shadow 0.2s ease;
}

.cosmetology-page .button-primary,
.cosmetology-page .button-primary:visited,
.cosmetology-page .button-primary:hover,
.cosmetology-page .button-primary:focus,
.cosmetology-page .button-primary:active {
    color: var(--color-white);
}

.button-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.button-primary:active {
    transform: translateY(1px);
}

.icon-arrow {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
}

.icon-arrow::after {
    position: absolute;
    top: 50%;
    left: 48%;
    width: 7px;
    height: 7px;
    border-top: 2px solid var(--color-white);
    border-right: 2px solid var(--color-white);
    content: "";
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ==========================================================================
   Page-specific styles
   ========================================================================== */
.cosmetology-banners {
    padding: 0 var(--gutter) clamp(4rem, 7vw, 5rem);
}

.cosmetology-banners__inner {
    display: grid;
    gap: clamp(1.5rem, 3vw, 1.875rem);
    width: min(calc(100% - 2rem), var(--container));
    margin-inline: auto;
}

.cosmetology-banners__main {
    display: block;
    overflow: hidden;
    background: var(--color-soft);
    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

.cosmetology-banners__main picture {
    display: block;
}

.cosmetology-banners__main-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.cosmetology-banners__main:hover,
.cosmetology-banners__item:hover {
    filter: saturate(1.05) brightness(1.02);
    transform: translateY(-1px);
}

.cosmetology-banners__list {
    display: grid;
    gap: 1rem;
    justify-content: center;
}

.cosmetology-banners__item {
    position: relative;
    display: block;
    width: min(100%, 320px);
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition:
        filter 0.2s ease,
        transform 0.2s ease;
    cursor: pointer;
    appearance: none;
}

.cosmetology-banners__item::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: grid;
    place-items: center;
    padding: 0.75rem;
    background: #f59d9d;
    color: #000;
    content: attr(data-banner-label);
    font-size: clamp(0.875rem, 1.8vw, 1rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.cosmetology-banners__item--hair::before {
    background: #ffd381;
}

.cosmetology-banners__item--peeling::before {
    background: #c9f88f;
}

.cosmetology-banners__item.is-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(249, 124, 0, 0.15);
}

.cosmetology-banners__thumb {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 1920 / 700;
    object-fit: cover;
}

.cosmetology-banners__item-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cosmetology-section--concerns {
    background: #f8f5f1;
}

.concern-list {
    display: grid;
    gap: 1rem 1.1875rem;
}

.concern-card {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: var(--color-white);
    box-shadow: var(--shadow-card);
    color: var(--color-muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    line-height: 1.45;
    transition:
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.concern-card:hover {
    color: var(--color-primary);
    box-shadow: 0 6px 14px rgba(90, 71, 22, 0.08);
    transform: translateY(-1px);
}

.treatment-list {
    display: grid;
    gap: 0 1.25rem;
}

.treatment-list > li {
    scroll-margin-top: 6rem;
}

.treatment-link {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--color-border);
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
    line-height: 1.45;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.treatment-link:hover {
    background: rgba(249, 124, 0, 0.04);
    color: var(--color-primary);
}

.flow-section {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 8vw, 6.25rem) 0 clamp(5rem, 8vw, 7.5rem);
}

.flow-section__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: min(45vw, 661px);
    min-height: 360px;
}

.flow-section__background::after {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    content: "";
}

.flow-section__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flow-section__inner {
    position: relative;
    z-index: 1;
}

.flow-list {
    display: grid;
    gap: 1.5rem;
}

.flow-card {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-white);
}

.flow-card__image {
    overflow: hidden;
    border-radius: 4px;
}

.flow-card__image img {
    width: 100%;
    aspect-ratio: 320 / 200;
    object-fit: cover;
}

.flow-card__body {
    display: grid;
    align-content: start;
    gap: 1.5rem;
}

.flow-card__header {
    display: grid;
    gap: 0.75rem;
}

.flow-card__step {
    color: var(--color-accent);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.flow-card__title {
    color: var(--color-text);
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 500;
    line-height: 1.45;
}

.flow-card__text {
    display: grid;
    gap: 0.35rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.7;
}

.feature-section {
    display: grid;
    gap: clamp(3rem, 6vw, 4rem);
    padding: 0 var(--gutter) clamp(5rem, 8vw, 6.25rem);
}

.feature-section__intro {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
    width: min(calc(100% - 2rem), var(--container-wide));
    margin-inline: auto;
}

.feature-section__image img {
    width: 100%;
    object-fit: cover;
}

.feature-section__body {
    display: grid;
    gap: 1.5rem;
}

.feature-section__title {
    display: grid;
    color: var(--color-primary);
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.7;
}

.feature-section__text {
    display: grid;
    gap: 1rem;
    color: var(--color-text);
    font-size: clamp(1rem, 2vw, 1.0625rem);
    line-height: 1.8;
}

.aftercare {
    display: grid;
    gap: 1.875rem;
    width: min(calc(100% - 2rem), var(--container));
    margin-inline: auto;
    font-size: 0.9em;
}

.aftercare__title {
    padding: 0.35rem 1.5rem;
    color: var(--color-white);
    font-family: var(--font-round);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.7;
    text-align: center;
    color: #ff9c0e;
}

.aftercare__list {
    display: grid;
    gap: 0.75rem;
}

.aftercare__list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--color-text);
    font-size: clamp(0.9rem, 2vw, 0.9rem);
    line-height: 1.75;
}

.aftercare__list li::before {
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background: #ff9c0e;
    content: "";
}

.cta-section {
    position: relative;
    display: grid;
    min-height: clamp(32rem, 47vw, 41.9375rem);
    align-items: center;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 7.5rem) var(--gutter);
}

.cta-section__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-section__inner {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), var(--container-wide));
    margin-inline: auto;
}

.cta-section__panel {
    display: grid;
    justify-items: center;
    gap: 2rem;
    width: min(100%, 700px);
    margin-inline: auto;
    padding: clamp(2rem, 4vw, 3.1875rem) clamp(1.25rem, 5vw, 4.125rem);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    text-align: center;
}

.cta-section__title {
    display: grid;
    color: var(--color-text);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.5;
}

.cta-section__text {
    display: grid;
    color: var(--color-text);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.7;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (min-width: 48rem) {
    .cosmetology-banners__list {
        grid-template-columns: repeat(3, minmax(0, 320px));
        gap: 1.5rem;
    }

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

@media (min-width: 64rem) {
    .treatment-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow-card {
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: start;
    }

    .feature-section__intro {
        grid-template-columns: minmax(0, 712px) minmax(20rem, 474px);
    }

    .cta-section__inner {
        display: flex;
        justify-content: flex-end;
    }

    .cta-section__panel {
        margin-inline: 0;
    }
}

@media (min-width: 75rem) {
    .concern-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 30rem) {
    .cosmetology-container,
    .cosmetology-banners__inner,
    .feature-section__intro,
    .aftercare,
    .cta-section__inner {
        width: min(calc(100% - 1.25rem), var(--container));
    }

    .concern-card,
    .treatment-link {
        padding-inline: 1rem;
    }

    .section-heading__en {
        font-size: clamp(2.75rem, 14vw, 3.5rem);
    }
}
