/* ==============================
   GlobalToneCare - Graffiti Luxe
   ============================== */

/* CSS Custom Property for border animation */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: #f0ece2;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---- Scroll Container ---- */
#scroll-container {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: 100vh;
}

/* ---- Scene (each full-height section) ---- */
.scene {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scene-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 75vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 0;
}

/* ---- Bordered Scenes (animated gold border) ---- */
.bordered-scene {
    border: 1px solid #c9a84c;
}

.bordered-scene::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid transparent;
    border-image: conic-gradient(from var(--angle), #c9a84c, transparent 40%, #c9a84c) 1;
    animation: rotateBorder 4s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}

/* ---- HERO SECTION ---- */
#hero {
    background: #0a0a0a;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

#hero-svg {
    width: 90%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero-text-stroke,
.hero-text-fill {
    font-family: 'Cormorant Garamond', serif;
    font-size: 80px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-text-stroke {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawStroke 2.5s ease-out forwards;
}

.hero-text-fill {
    opacity: 0;
    animation: fadeInFill 1s ease-out 2s forwards;
}

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

@keyframes fadeInFill {
    to {
        opacity: 1;
    }
}

.hero-tagline {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #8a8578;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s ease-out 2.8s forwards;
}

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

/* ---- GOLD SPHERES ---- */
.gold-sphere {
    border-radius: 50%;
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(232, 212, 139, 0.6), rgba(201, 168, 76, 0.2) 50%, rgba(10, 10, 10, 0.4) 100%);
    box-shadow: inset -20px -20px 40px rgba(201, 168, 76, 0.3), 0 0 60px rgba(201, 168, 76, 0.15);
    pointer-events: none;
}

.gold-sphere-hero {
    width: 300px;
    height: 300px;
    top: 15%;
    right: 8%;
    opacity: 0.5;
    animation: sphereFloat 12s ease-in-out infinite, sphereFadeIn 2s ease-out 0.5s forwards;
    opacity: 0;
}

.gold-sphere-sm {
    width: 80px;
    height: 80px;
}

.gold-sphere-xs {
    width: 40px;
    height: 40px;
}

.gold-sphere-1 {
    top: 60%;
    left: 5%;
    opacity: 0;
    animation: sphereFloat 15s ease-in-out infinite 1s, sphereFadeIn 2s ease-out 1s forwards;
}

.gold-sphere-2 {
    top: 25%;
    left: 15%;
    opacity: 0;
    animation: sphereFloat 18s ease-in-out infinite 2s, sphereFadeIn 2s ease-out 1.5s forwards;
}

.gold-sphere-3 {
    bottom: 20%;
    right: 15%;
    opacity: 0;
    animation: sphereFloat 10s ease-in-out infinite 0.5s, sphereFadeIn 2s ease-out 2s forwards;
}

.gold-sphere-product {
    width: 250px;
    height: 250px;
    position: relative;
    animation: spherePulse 6s ease-in-out infinite;
    box-shadow: inset -25px -25px 50px rgba(201, 168, 76, 0.35), 0 0 80px rgba(201, 168, 76, 0.2), 0 0 120px rgba(201, 168, 76, 0.08);
}

.sphere-variant-2 {
    border: 1px solid rgba(212, 184, 150, 0.1);
    background: radial-gradient(circle at 40% 25%, #f5ecd0, #d4b896 45%, rgba(10, 10, 10, 0.5) 100%);
}

.sphere-variant-3 {
    background: radial-gradient(circle at 25% 35%, rgba(232, 212, 139, 0.7), rgba(201, 168, 76, 0.15) 55%, rgba(17, 17, 17, 0.5) 100%);
}

@keyframes sphereFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-15px) translateX(5px); }
    50% { transform: translateY(-8px) translateX(-5px); }
    75% { transform: translateY(-20px) translateX(3px); }
}

@keyframes sphereFadeIn {
    from { opacity: 0; }
    to { opacity: 0.55; }
}

@keyframes spherePulse {
    0%, 100% { transform: scale(1); box-shadow: inset -25px -25px 50px rgba(201, 168, 76, 0.35), 0 0 80px rgba(201, 168, 76, 0.2); }
    50% { transform: scale(1.04); box-shadow: inset -25px -25px 50px rgba(201, 168, 76, 0.4), 0 0 100px rgba(201, 168, 76, 0.25); }
}

/* ---- DRIP EFFECTS ---- */
.drip {
    position: absolute;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, #c9a84c, #6b4f2e, transparent);
    border-radius: 0 0 4px 4px;
    z-index: 5;
    transition: height 1.2s cubic-bezier(0.33, 0, 0.67, 1.5);
}

.drip-1 { left: 20%; }
.drip-2 { right: 25%; }
.drip-3 { left: 35%; }
.drip-4 { right: 18%; }

.drip.drip-active {
    height: 120px;
}

/* ---- MANIFESTO SECTION ---- */
#manifesto {
    background: #111111;
}

.manifesto-content {
    max-width: 680px;
    text-align: center;
    padding: 0 24px;
}

.manifesto-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.02em;
    color: #c9a84c;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-text {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #f0ece2;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-text em {
    font-style: italic;
    color: #e8d48b;
}

.manifesto-content.visible .manifesto-heading,
.manifesto-content.visible .manifesto-text {
    opacity: 1;
    transform: translateY(0);
}

.manifesto-content.visible .manifesto-text:nth-child(2) {
    transition-delay: 0.2s;
}

.manifesto-content.visible .manifesto-text:nth-child(3) {
    transition-delay: 0.4s;
}

.manifesto-content.visible .manifesto-text:nth-child(4) {
    transition-delay: 0.6s;
}

/* ---- PRODUCT SECTIONS ---- */
.product-scene {
    background: #0a0a0a;
}

#product-2 {
    background: #111111;
}

.product-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
    padding: 0 24px;
}

.product-sphere-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    max-width: 500px;
}

.product-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.02em;
    color: #f0ece2;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-annotation {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: #e8d48b;
    margin-bottom: 1rem;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.product-desc {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #8a8578;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-panel.visible .product-title {
    opacity: 1;
    transform: translateY(0);
}

.product-panel.visible .product-annotation {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.3s;
}

.product-panel.visible .product-desc {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* ---- GRAFFITI ANNOTATIONS (SVG) ---- */
.graffiti-annotation {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.annotation-circle {
    width: 260px;
    height: 260px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.annotation-arrow {
    width: 80px;
    height: 48px;
    top: 10%;
    right: -30px;
}

.annotation-underline {
    width: 220px;
    height: 30px;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.annotation-arrow-2 {
    width: 40px;
    height: 80px;
    bottom: -10px;
    right: -20px;
}

.annotation-circle-2 {
    width: 280px;
    height: 240px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.annotation-x-mark {
    width: 40px;
    height: 40px;
    top: -5px;
    left: -10px;
}

.product-panel.visible .graffiti-annotation {
    opacity: 1;
}

.product-panel.visible .draw-path {
    animation: drawPath 1.2s ease-out 0.4s forwards;
}

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

/* ---- BUBBLE PARTICLES ---- */
.bubble-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bubble-particle {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(232, 212, 139, 0.5), rgba(201, 168, 76, 0.15) 60%, transparent 100%);
    opacity: 0;
    will-change: transform;
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(calc(-100vh - 80px)) translateX(var(--drift, 20px));
        opacity: 0;
    }
}

/* ---- CLOSING SECTION ---- */
#closing {
    background: #0a0a0a;
}

.closing-content {
    text-align: center;
    z-index: 3;
    position: relative;
}

.closing-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.02em;
    line-height: 1.15;
    background: linear-gradient(180deg, #c9a84c 0%, #e8d48b 40%, #c9a84c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.closing-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-link {
    display: inline-block;
    margin-top: 3rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c9a84c;
    text-decoration: none;
    border: 1px solid #c9a84c;
    padding: 0.75em 2em;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s, color 0.3s ease, background 0.3s ease;
}

.closing-text.visible ~ .cta-link {
    opacity: 1;
    transform: translateY(0);
}

.cta-link:hover {
    color: #0a0a0a;
    background: #f5ecd0;
    border-color: #f5ecd0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .scene-inner {
        max-width: 90vw;
    }

    .gold-sphere-hero {
        width: 180px;
        height: 180px;
        top: 10%;
        right: 2%;
    }

    .gold-sphere-product {
        width: 180px;
        height: 180px;
    }

    .product-sphere-container {
        width: 200px;
        height: 200px;
    }

    .hero-text-stroke,
    .hero-text-fill {
        font-size: 50px;
    }

    .gold-sphere-1 { left: 2%; }
    .gold-sphere-2 { left: 8%; }
}

@media (max-width: 480px) {
    .hero-text-stroke,
    .hero-text-fill {
        font-size: 36px;
    }

    .gold-sphere-hero {
        width: 120px;
        height: 120px;
    }

    .gold-sphere-product {
        width: 140px;
        height: 140px;
    }

    .product-sphere-container {
        width: 160px;
        height: 160px;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .bubble-particle {
        animation: none;
        display: none;
    }

    .bordered-scene::before {
        animation: none;
        border-image: none;
        border: 1px solid #c9a84c;
    }

    .gold-sphere {
        animation: none;
        opacity: 0.4;
    }

    .gold-sphere-product {
        animation: none;
    }

    .hero-text-stroke {
        animation: none;
        stroke-dashoffset: 0;
    }

    .hero-text-fill {
        animation: none;
        opacity: 1;
    }

    .hero-tagline {
        animation: none;
        opacity: 1;
    }
}
