/* ==========================================
   globaltonecare.com — Styles
   McBling / Dreamy-Ethereal / Creamy-Pastel
   ========================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: #5A4A5E;
    background: #FFF8F5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #F4C6D7 0%, #C9B8E8 50%, #F5D3B8 100%);
    z-index: 9999;
    pointer-events: none;
    transition: none;
}

/* --- Background Color Temperature Layers --- */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bg-layer--cream {
    background: #FFF8F5;
    opacity: 1;
}

.bg-layer--lavender {
    background: #F3EAF5;
    opacity: 0;
}

.bg-layer--peach {
    background: #FFF0E8;
    opacity: 0;
}

/* --- Background Blob Containers --- */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.blob-container--bg {
    z-index: -3;
}

.blob-container--mid {
    z-index: -2;
}

/* --- Blob Base Styles --- */
.blob {
    position: absolute;
    will-change: transform;
}

.blob--bg.blob--1 {
    width: 600px;
    height: 600px;
    top: -10%;
    left: -10%;
    animation: blobDrift1 45s ease-in-out infinite;
}

.blob--bg.blob--2 {
    width: 500px;
    height: 500px;
    top: 40%;
    right: -15%;
    animation: blobDrift2 55s ease-in-out infinite;
}

.blob--mid.blob--3 {
    width: 350px;
    height: 350px;
    top: 20%;
    left: 30%;
    animation: blobDrift3 38s ease-in-out infinite;
}

.blob--mid.blob--4 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 20%;
    animation: blobDrift4 42s ease-in-out infinite;
}

.blob--fg.blob--5 {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 15%;
    right: 10%;
    z-index: 1;
    pointer-events: none;
    animation: blobDrift5 30s ease-in-out infinite;
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(80px, 60px); }
    50% { transform: translate(40px, 120px); }
    75% { transform: translate(-40px, 80px); }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-60px, -40px); }
    50% { transform: translate(-100px, 30px); }
    75% { transform: translate(-30px, -60px); }
}

@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(50px, -40px); }
    50% { transform: translate(-30px, -80px); }
    75% { transform: translate(70px, 30px); }
}

@keyframes blobDrift4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-50px, 40px); }
    50% { transform: translate(30px, 70px); }
    75% { transform: translate(-40px, -30px); }
}

@keyframes blobDrift5 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-30px, 25px); }
    50% { transform: translate(20px, -15px); }
    75% { transform: translate(-15px, -30px); }
}

/* --- Opening Veil --- */
.opening-veil {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.opening-veil::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,248,245,0.95) 0%, rgba(243,234,245,0.8) 100%);
    z-index: 0;
    pointer-events: none;
}

.logotype {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
}

.logotype-svg {
    width: 100%;
    height: auto;
}

.logotype-text {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLogotype 3s ease-in-out forwards;
}

@keyframes drawLogotype {
    to {
        stroke-dashoffset: 0;
    }
}

.rhinestone-dot {
    opacity: 0;
    animation: rhinestoneAppear 0.5s ease-out forwards;
}

.logotype .rhinestone-dot:nth-child(2) { animation-delay: 2.2s; }
.logotype .rhinestone-dot:nth-child(3) { animation-delay: 2.4s; }
.logotype .rhinestone-dot:nth-child(4) { animation-delay: 2.6s; }
.logotype .rhinestone-dot:nth-child(5) { animation-delay: 2.8s; }
.logotype .rhinestone-dot:nth-child(6) { animation-delay: 3.0s; }
.logotype .rhinestone-dot:nth-child(7) { animation-delay: 3.2s; }

@keyframes rhinestoneAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.veil-subtitle {
    position: relative;
    z-index: 2;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8B7090;
    margin-top: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 3s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Bobbing Chevron --- */
.chevron-down {
    position: absolute;
    bottom: 40px;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 1s ease-out 3.5s forwards, chevronBob 2s ease-in-out 4.5s infinite;
}

@keyframes chevronBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* --- Section Headings (DM Serif Display) --- */
.section-heading {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 72px;
    letter-spacing: -0.03em;
    line-height: 0.92;
    color: #5A4A5E;
    text-shadow: 0 2px 20px rgba(200, 160, 200, 0.4);
    text-align: center;
    margin-bottom: 60px;
    padding-top: 80px;
}

.cell-heading {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 32px;
    letter-spacing: -0.03em;
    line-height: 0.92;
    color: #5A4A5E;
    text-shadow: 0 2px 20px rgba(200, 160, 200, 0.4);
    margin-bottom: 16px;
}

/* --- Animate Heading Characters --- */
.animate-heading .heading-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.animate-heading .heading-char.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Masonry Sections --- */
.masonry-section {
    position: relative;
    z-index: 1;
    padding: 0 40px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-section--lavender {
    /* Color handled by bg-layer transitions */
}

.masonry-section--peach {
    /* Warmer palette shift */
}

/* --- Masonry Grid (CSS Columns) --- */
.masonry-grid {
    column-count: 3;
    column-gap: 40px;
}

/* --- Masonry Cells --- */
.masonry-cell {
    break-inside: avoid;
    margin-bottom: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 200, 220, 0.3);
    padding: 28px;
    background: #F3EAF5;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}

.masonry-cell:nth-child(even) {
    transform: translateX(30px);
    background: #FFF8F5;
}

.masonry-cell.revealed {
    opacity: 1;
    transform: translateX(0);
}

.masonry-cell:hover {
    border-color: rgba(201, 184, 232, 0.6);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(90, 74, 94, 0.08);
}

.masonry-cell.revealed:hover {
    transform: translateY(-4px);
}

/* Cell size variants */
.masonry-cell--tall {
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.masonry-cell--medium {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.masonry-cell--short {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.masonry-cell--square {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Deep masonry warm shift */
.masonry-section--peach .masonry-cell {
    background: #FFF0E8;
}

.masonry-section--peach .masonry-cell:nth-child(even) {
    background: #FFF8F5;
}

/* --- Rhinestone Background Pattern --- */
.rhinestone-bg {
    background-image:
        radial-gradient(circle, rgba(201, 184, 232, 0.3) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(244, 198, 215, 0.25) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

.masonry-section--peach .rhinestone-bg {
    background-image:
        radial-gradient(circle, rgba(201, 184, 232, 0.3) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(244, 198, 215, 0.25) 1.5px, transparent 1.5px);
    background-color: #FFF0E8;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

.rhinestone-bg:hover {
    background-image:
        radial-gradient(circle, rgba(201, 184, 232, 0.6) 1.8px, transparent 1.8px),
        radial-gradient(circle, rgba(244, 198, 215, 0.5) 1.8px, transparent 1.8px);
}

/* --- Cell Text Styles --- */
.cell-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: #5A4A5E;
}

.cell-text--accent {
    color: #8B7090;
    font-style: italic;
}

/* --- Line Illustrations --- */
.line-illustration {
    width: 100%;
    height: auto;
    max-height: 320px;
}

.draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke 0.4s ease;
}

.draw-path.drawn {
    animation: drawPath 2.5s ease-in-out forwards;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

.masonry-cell:hover .draw-path {
    stroke: #C9B8E8;
}

/* --- Cell Blob SVGs --- */
.cell-blob {
    width: 80%;
    height: auto;
}

/* --- Counter Animation --- */
.counter-display {
    text-align: center;
}

.counter-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #B89AC4;
    margin-bottom: 12px;
}

.counter-digits {
    display: inline-flex;
    gap: 2px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 56px;
    font-variant-numeric: tabular-nums;
    color: #5A4A5E;
    line-height: 1;
}

.digit-wrapper {
    display: inline-block;
    height: 1.1em;
    overflow: hidden;
    position: relative;
}

.digit-inner {
    display: flex;
    flex-direction: column;
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.digit-inner span {
    display: block;
    height: 1.1em;
    line-height: 1.1em;
}

.counter-display--decorative .counter-digits {
    font-size: 42px;
    color: #8B7090;
}

/* --- Blob Interlude --- */
.blob-interlude {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.interlude-blob {
    position: absolute;
    will-change: transform;
}

.interlude-blob--1 {
    width: 500px;
    height: 500px;
    top: 5%;
    left: 5%;
    animation: interBlobDrift1 40s ease-in-out infinite;
    mix-blend-mode: multiply;
}

.interlude-blob--2 {
    width: 450px;
    height: 450px;
    top: 20%;
    right: 5%;
    animation: interBlobDrift2 50s ease-in-out infinite;
    mix-blend-mode: multiply;
}

.interlude-blob--3 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: 15%;
    animation: interBlobDrift3 35s ease-in-out infinite;
    mix-blend-mode: multiply;
}

.interlude-blob--4 {
    width: 350px;
    height: 350px;
    bottom: 5%;
    right: 15%;
    animation: interBlobDrift4 45s ease-in-out infinite;
    mix-blend-mode: multiply;
}

.interlude-blob--5 {
    width: 300px;
    height: 300px;
    top: 35%;
    left: 35%;
    animation: interBlobDrift5 32s ease-in-out infinite;
    mix-blend-mode: multiply;
}

@keyframes interBlobDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(100px, 50px); }
    50% { transform: translate(50px, 100px); }
    75% { transform: translate(-50px, 60px); }
}

@keyframes interBlobDrift2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-80px, 40px); }
    50% { transform: translate(-120px, -30px); }
    75% { transform: translate(-40px, -70px); }
}

@keyframes interBlobDrift3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(60px, -40px); }
    50% { transform: translate(120px, 20px); }
    75% { transform: translate(40px, 50px); }
}

@keyframes interBlobDrift4 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-40px, -50px); }
    50% { transform: translate(30px, -80px); }
    75% { transform: translate(-60px, 20px); }
}

@keyframes interBlobDrift5 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(40px, -30px); }
    50% { transform: translate(-20px, 40px); }
    75% { transform: translate(30px, 60px); }
}

/* --- Closing Mist --- */
.closing-mist {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: #3A2840;
}

.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #C9B8E8;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1.2);
    }
}

/* --- Closing Message --- */
.closing-message {
    position: relative;
    z-index: 2;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 48px;
    letter-spacing: -0.03em;
    line-height: 0.92;
    color: #F8F0F4;
    text-shadow: 0 2px 20px rgba(200, 160, 200, 0.4);
    text-align: center;
    padding: 0 40px;
}

.closing-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.closing-char.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 40px;
    z-index: 2;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.footer-logo {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 16px;
    color: #F8F0F4;
    letter-spacing: -0.02em;
    opacity: 0.7;
}

.footer-divider {
    width: 1px;
    height: 14px;
    background: #E8D8E8;
    opacity: 0.3;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8B7090;
    opacity: 0.6;
}

/* --- Text Link Underline Animation --- */
a {
    color: #5A4A5E;
    text-decoration: none;
    background-image: linear-gradient(#C9B8E8, #C9B8E8);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.4s ease;
}

a:hover {
    background-size: 100% 1px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 28px;
    }

    .masonry-cell {
        margin-bottom: 28px;
        padding: 20px;
    }

    .section-heading {
        font-size: 48px;
        margin-bottom: 40px;
        padding-top: 60px;
    }

    .cell-heading {
        font-size: 26px;
    }

    .closing-message {
        font-size: 36px;
    }

    .masonry-section {
        padding: 0 28px 60px;
    }

    .counter-digits {
        font-size: 42px;
    }

    .logotype-svg text {
        font-size: 48px;
    }

    .blob--bg.blob--1 { width: 400px; height: 400px; }
    .blob--bg.blob--2 { width: 350px; height: 350px; }
    .blob--mid.blob--3 { width: 250px; height: 250px; }
    .blob--mid.blob--4 { width: 200px; height: 200px; }

    .interlude-blob--1 { width: 300px; height: 300px; }
    .interlude-blob--2 { width: 280px; height: 280px; }
    .interlude-blob--3 { width: 250px; height: 250px; }
    .interlude-blob--4 { width: 220px; height: 220px; }
    .interlude-blob--5 { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }

    .section-heading {
        font-size: 36px;
        padding-top: 40px;
        margin-bottom: 30px;
    }

    .cell-heading {
        font-size: 22px;
    }

    .closing-message {
        font-size: 28px;
    }

    .masonry-section {
        padding: 0 16px 40px;
    }

    .counter-digits {
        font-size: 36px;
    }

    .veil-subtitle {
        font-size: 11px;
    }

    .blob--bg.blob--1 { width: 280px; height: 280px; }
    .blob--bg.blob--2 { width: 250px; height: 250px; }
}
