:root {
    --serenity: #92a8d1;
    --rose-quartz: #f7cac9;
    --serenity-deep: #344563;
    --serenity-ink: #25324a;
    --serenity-mist: #eef2fa;
    --serenity-cloud: #f8f9fd;
    --serenity-line: rgba(69, 89, 128, 0.2);
    --serenity-glass: rgba(255, 255, 255, 0.78);
    --serenity-shadow: 0 24px 70px rgba(52, 69, 99, 0.16);
    --serenity-soft-shadow: 0 12px 34px rgba(52, 69, 99, 0.12);
}

body.color-gallery-page {
    --color-turquoise: var(--serenity);
    --color-turquoise-dark: var(--serenity-deep);
    --color-coral: #f1c7d3;
    --page-background: var(--serenity-cloud);
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 3%, rgba(146, 168, 209, 0.38), transparent 28rem),
        radial-gradient(circle at 92% 18%, rgba(241, 199, 211, 0.35), transparent 25rem),
        linear-gradient(180deg, #f5f7fc 0%, #fcfbfd 44%, #eef2fa 100%);
    color: var(--serenity-ink);
}

body.color-gallery-page::before {
    content: "";
    position: fixed;
    z-index: -1;
    right: -8rem;
    bottom: -8rem;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(146, 168, 209, 0.32);
    border-radius: 50%;
    box-shadow:
        0 0 0 3rem rgba(146, 168, 209, 0.05),
        0 0 0 7rem rgba(146, 168, 209, 0.035);
}

.color-gallery-page .font-page,
.color-gallery-page .fashion-page {
    position: relative;
}

.serenity-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 22px;
    color: var(--serenity-deep);
    font-family: "Geist", Arial, sans-serif;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-transform: uppercase;
}

.serenity-signature span:not(.serenity-chip) + span {
    position: relative;
}

.serenity-signature span:not(.serenity-chip) + span::before {
    content: "·";
    position: absolute;
    left: -10px;
    color: rgba(52, 69, 99, 0.48);
}

.serenity-chip {
    width: 30px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--serenity);
    box-shadow: 0 3px 10px rgba(52, 69, 99, 0.22);
}

.color-gallery-page .colors-intro,
.color-gallery-page .fashion-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    align-items: start;
    gap: clamp(28px, 5vw, 64px);
    width: min(1280px, 100%);
    margin: 0 auto 4rem;
    padding: clamp(28px, 5vw, 58px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 242, 250, 0.82));
    box-shadow: var(--serenity-shadow);
    text-align: left;
}

.color-gallery-page .colors-intro::after,
.color-gallery-page .fashion-intro::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -55px;
    width: 210px;
    height: 210px;
    border-radius: 48% 52% 64% 36%;
    background: linear-gradient(145deg, rgba(146, 168, 209, 0.52), rgba(241, 199, 211, 0.25));
    transform: rotate(18deg);
    pointer-events: none;
}

.color-gallery-page .colors-intro > *,
.color-gallery-page .fashion-intro > * {
    position: relative;
    z-index: 1;
}

.serenity-intro-copy {
    padding-top: 84px;
}

.serenity-intro-copy > :last-child {
    margin-bottom: 0 !important;
}

.named-colors-page .colors-intro h1,
.fashion-colors-page .fashion-intro .fashion-title {
    max-width: 1060px;
    margin: 0 0 24px;
    color: var(--serenity-deep);
    font-family: "Gideon Roman", Georgia, serif;
    font-size: clamp(1.15rem, 3vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 0.98;
    text-align: left;
}

.named-colors-page .colors-intro {
    grid-template-columns: 1fr;
    gap: 30px;
}

.named-colors-page .serenity-intro-title {
    width: 70%;
}

.named-colors-page .named-intro-texts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(30px, 5vw, 72px);
    padding-top: 24px;
    border-top: 1px solid rgba(146, 168, 209, 0.24);
}

.named-colors-page .named-intro-text,
.named-colors-page .named-intro-text.serenity-intro-copy {
    align-self: start;
    padding-top: 0;
}

.named-colors-page .named-intro-text p {
    margin: 0 0 10px;
    line-height: 1.5;
}

.named-colors-page .named-intro-text ul {
    gap: 6px 12px;
    margin: 12px 0 0;
}

.named-colors-page .named-intro-text li {
    padding: 7px 10px 7px 30px;
}

.named-colors-page .named-intro-text li::before {
    left: 11px;
    width: 8px;
    height: 8px;
}

.color-gallery-page .colors-intro p,
.color-gallery-page .fashion-intro p {
    max-width: 760px;
    margin: 0 0 16px;
    color: #39465e;
    font-size: clamp(1rem, 1.4vw, 1.14rem);
    line-height: 1.7;
}

.named-colors-page .colors-intro ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 22px;
    max-width: 680px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.named-colors-page .colors-intro li {
    position: relative;
    padding: 10px 12px 10px 34px;
    border: 1px solid rgba(146, 168, 209, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
}

.named-colors-page .colors-intro li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 13px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--serenity);
    box-shadow: 0 0 0 4px rgba(146, 168, 209, 0.16);
    transform: translateY(-50%);
}

.color-gallery-page .colors-intro a,
.color-gallery-page .fashion-intro a {
    color: #405f98;
    font-weight: 650;
    text-underline-offset: 3px;
}

.named-colors-page .header-top-nav {
    top: 10px;
    z-index: 30;
    justify-content: center;
    width: min(1180px, 100%);
    margin-bottom: 34px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    background: rgba(247, 249, 253, 0.86);
    box-shadow: 0 10px 34px rgba(52, 69, 99, 0.14);
    backdrop-filter: blur(18px);
}

.named-colors-page .header-top-nav a {
    justify-content: center;
    border: 1px solid rgba(52, 69, 99, 0.18);
    background: rgba(146, 168, 209, 0.2);
    color: var(--serenity-deep);
    box-shadow: 0 3px 9px rgba(52, 69, 99, 0.08);
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.named-colors-page .header-top-nav a:hover,
.named-colors-page .header-top-nav a:focus-visible {
    border-color: rgba(102, 69, 78, 0.24);
    background: var(--rose-quartz);
    color: #412f36;
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(102, 69, 78, 0.16);
}

.named-colors-page .header-top-nav a:last-child {
    background: var(--serenity);
    color: #1f2b42;
}

.named-colors-page .header-top-nav a:last-child:hover,
.named-colors-page .header-top-nav a:last-child:focus-visible {
    border-color: rgba(102, 69, 78, 0.24);
    background: var(--rose-quartz);
    color: #412f36;
}

.gallery-switcher {
    display: flex;
    justify-content: flex-start;
    width: min(980px, 100%);
    margin: 0 auto 20px;
}

.gallery-switcher a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(146, 168, 209, 0.38);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--serenity-deep);
    font-family: "Geist", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(52, 69, 99, 0.08);
}

.gallery-switcher a:hover,
.gallery-switcher a:focus-visible {
    background: var(--serenity-deep);
    color: #fff;
}

.named-colors-page .chapter-heading {
    margin-block: 4.5rem 2.2rem;
}

.named-colors-page .chapter-heading h2,
.named-colors-page .color-subheading {
    color: var(--serenity-deep);
    font-family: "Gideon Roman", Georgia, serif;
    letter-spacing: -0.02em;
}

.named-colors-page .chapter-heading h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.named-colors-page .color-subheading {
    margin-top: 3.5rem;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.named-colors-page .separator1,
.named-colors-page .separator2 {
    background: linear-gradient(90deg, transparent, var(--serenity), transparent);
}

.named-colors-page .separator1::after,
.named-colors-page .separator2::after {
    content: "◆";
    background: #f7f8fc;
    color: var(--serenity);
}

.named-colors-page .card {
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 22px;
    box-shadow: var(--serenity-soft-shadow);
}

.named-colors-page .color-card {
    isolation: isolate;
    transform: translateZ(0);
}

.named-colors-page .color-card:hover {
    transform: translateY(-7px) scale(1.015);
    box-shadow: 0 20px 46px rgba(52, 69, 99, 0.22);
}

.named-colors-page .color-info .name {
    font-weight: 650;
    letter-spacing: 0.01em;
}

.named-colors-page .color-values code {
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
}

.fashion-colors-page .fashion-page {
    width: min(100% - 40px, 1280px);
    padding-block: 50px 90px;
}

.fashion-colors-page .fashion-palette {
    width: min(100%, 1120px);
    padding: clamp(20px, 4vw, 42px);
    margin: 10px auto;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--serenity-soft-shadow);
    backdrop-filter: blur(14px);
}

.fashion-colors-page .fashion-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.fashion-colors-page .fashion-color-grid.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.fashion-colors-page .fashion-color-grid:not(.is-single) > .fashion-swatch:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 9px);
    justify-self: center;
}

.fashion-colors-page .fashion-palette + .fashion-palette {
    margin-top: 34px;
}

.fashion-colors-page .fashion-palette > .fashion-title {
    position: relative;
    margin: 0 0 28px;
    padding-bottom: 17px;
    color: var(--serenity-deep);
    font-family: "Gideon Roman", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.05;
}

.fashion-colors-page .fashion-palette > .fashion-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 76px;
    height: 4px;
    border-radius: 999px;
    background: var(--serenity);
}

.fashion-colors-page .fashion-swatch {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 132px;
    margin: 0;
    padding: 20px 24px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 17px;
    box-shadow: 0 8px 22px rgba(52, 69, 99, 0.12);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.fashion-colors-page .fashion-swatch:last-child {
    margin-bottom: 0;
}

.fashion-colors-page .fashion-swatch:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 34px rgba(52, 69, 99, 0.2);
}

.fashion-colors-page .fashion-swatch h3 {
    width: 100%;
    margin: 0 0 14px;
    color: inherit !important;
    font-family: "Geist", Arial, sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    font-weight: 450;
    letter-spacing: -0.02em;
}

.fashion-colors-page .fashion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: inherit !important;
    font-family: "Geist", Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-transform: uppercase;
}

.fashion-colors-page .fashion-meta span {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit !important;
}

.fashion-colors-page .fashion-source {
    margin-top: 18px !important;
    font-size: 0.9rem !important;
}

@media (max-width: 760px) {
    .color-gallery-page .colors-intro,
    .color-gallery-page .fashion-intro {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 2.8rem;
        border-radius: 24px;
    }

    .named-colors-page .colors-intro ul {
        grid-template-columns: 1fr;
    }

    .named-colors-page .serenity-intro-title {
        width: 100%;
    }

    .named-colors-page .named-intro-texts {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-top: 20px;
    }

    .serenity-signature {
        gap: 7px 12px;
        font-size: 0.68rem;
    }

    .fashion-colors-page .fashion-page {
        width: min(100% - 24px, 1180px);
        padding-block: 32px 60px;
    }

    .fashion-colors-page .fashion-palette {
        border-radius: 22px;
    }

    .fashion-colors-page .fashion-color-grid {
        grid-template-columns: 1fr;
    }

    .fashion-colors-page .fashion-color-grid:not(.is-single) > .fashion-swatch:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .named-colors-page .color-card,
    .fashion-colors-page .fashion-swatch {
        transition: none;
    }
}
