/* ============================================
   GABS.AI - McBling Aesthetic Styles
   값 - Value, Price, Worth
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    color: #1E1E24;
    background-color: #FFF8F0;
    overflow-x: hidden;
}

/* --- Metallic Rule --- */
.metallic-rule {
    height: 1px;
    background: linear-gradient(90deg, #D4A843, #C0C0C8, #B76E79);
    width: 0;
    transition: width 1.2s ease;
}

.metallic-rule.visible {
    width: 100%;
}

/* --- Sharp Angle Decorative Elements --- */
.sharp-angle {
    position: absolute;
    width: 0;
    height: 0;
    transform: scale(0);
    transition: transform 0.15s ease;
}

.sharp-angle.visible {
    transform: scale(1);
}

.sharp-angle--top-right {
    top: 20px;
    right: 20px;
    border-left: 30px solid transparent;
    border-bottom: 30px solid #D4A843;
}

.sharp-angle--bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: 30px solid transparent;
    border-top: 30px solid #B76E79;
}

.sharp-angle--corner {
    top: -5px;
    right: -5px;
    border-left: 20px solid transparent;
    border-bottom: 20px solid #D4A843;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF8F0 0%, #F5E1D0 30%, #D4A843 70%, #B76E79 100%);
    overflow: hidden;
}

#hero-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

#hero-title {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 900;
    font-size: clamp(60px, 15vw, 200px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: transparent;
    display: inline-block;
}

#hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    background: linear-gradient(90deg, #D4A843, #C0C0C8, #D4A843);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero-title .letter.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: metallicSweep 1.5s ease forwards;
}

@keyframes metallicSweep {
    0% { background-position: 100% 0; }
    100% { background-position: 0% 0; }
}

/* Rhinestone effect for .AI */
.dot-ai {
    display: inline-block;
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
    background: repeating-radial-gradient(
        circle at 30% 30%,
        #FFF8F0 0px,
        #D4A843 1px,
        #B76E79 2px,
        #C0C0C8 3px,
        transparent 4px
    );
    background-size: 6px 6px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.dot-ai.revealed {
    opacity: 1;
    clip-path: circle(100% at 50% 50%);
    transition: opacity 0.6s ease, clip-path 0.6s ease;
}

#hero-subtitle {
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 2vw, 22px);
    color: #1E1E24;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 2.2s, transform 0.6s ease 2.2s;
}

#hero-subtitle.revealed {
    opacity: 1;
    transform: translateY(0);
}

#hero-rule {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* ============================================
   SPARKLE STARS
   ============================================ */
.sparkle-star {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 10;
}

.sparkle-star::before,
.sparkle-star::after {
    content: '';
    position: absolute;
    background: #FFF8F0;
}

.sparkle-star::before {
    width: 2px;
    height: 8px;
    left: 3px;
    top: 0;
    border-radius: 1px;
}

.sparkle-star::after {
    width: 8px;
    height: 2px;
    left: 0;
    top: 3px;
    border-radius: 1px;
}

.sparkle-star.gold::before,
.sparkle-star.gold::after {
    background: #D4A843;
}

.sparkle-star.silver::before,
.sparkle-star.silver::after {
    background: #C0C0C8;
}

.sparkle-star.rose::before,
.sparkle-star.rose::after {
    background: #B76E79;
}

@keyframes sparkleAppear {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(22.5deg); }
    100% { opacity: 0; transform: scale(0) rotate(45deg); }
}

.sparkle-star.animate {
    animation: sparkleAppear 0.8s ease forwards;
}

/* ============================================
   TUTORIAL SECTIONS
   ============================================ */
.tutorial-section {
    position: relative;
    padding: 80px 5vw 100px;
    background-color: #FFF8F0;
}

.tutorial-section--blush {
    background-color: #F5E1D0;
}

.section-rule {
    margin-bottom: 50px;
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
}

/* F-Pattern: heading left, body flows */
.f-pattern .section-heading {
    position: relative;
    margin-bottom: 40px;
    display: inline-block;
}

.f-pattern .section-body {
    padding-left: 0;
}

/* Rhinestone heading effect */
.rhinestone-heading {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 5vw, 64px);
    line-height: 1.1;
    background: repeating-radial-gradient(
        circle at 30% 30%,
        #FFF8F0 0px,
        #D4A843 1px,
        #B76E79 2px,
        #C0C0C8 3px,
        transparent 4px
    );
    background-size: 6px 6px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-body p {
    margin-bottom: 24px;
    max-width: 680px;
}

.section-body strong {
    font-weight: 600;
    color: #C62D42;
}

.section-body em {
    font-style: italic;
    color: #B76E79;
}

/* ============================================
   VALUE CARDS
   ============================================ */
.tutorial-cards {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.value-card {
    width: 200px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFF8F0;
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, #D4A843, #C0C0C8, #B76E79) 1;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.value-card.revealed {
    opacity: 1;
    transform: translateX(0);
}

.tutorial-section--blush .value-card {
    background: #FFF8F0;
}

.card-label {
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C0C0C8;
}

.card-data {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 900;
    font-size: 32px;
    background: linear-gradient(90deg, #D4A843, #B76E79);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-data.mono {
    font-family: 'Red Hat Mono', monospace;
    font-weight: 600;
    font-size: 28px;
}

.card-desc {
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #1E1E24;
    opacity: 0.6;
}

/* ============================================
   TUTORIAL STEPS
   ============================================ */
.tutorial-steps {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tutorial-step {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tutorial-step.revealed {
    opacity: 1;
    transform: translateX(0);
}

.step-number {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 900;
    font-size: 48px;
    line-height: 1;
    background: linear-gradient(180deg, #D4A843, #C0C0C8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    width: 60px;
}

.step-content h3 {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 24px);
    color: #1E1E24;
    margin-bottom: 8px;
}

.step-content p {
    font-size: clamp(14px, 1.3vw, 16px);
    color: #1E1E24;
    opacity: 0.8;
    margin-bottom: 0;
}

/* ============================================
   SPECTRUM DISPLAY
   ============================================ */
.spectrum-display {
    margin: 40px 0;
    max-width: 680px;
}

.spectrum-bar {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, #D4A843 0%, #C0C0C8 50%, #C62D42 100%);
    border-radius: 4px;
    margin-bottom: 12px;
}

.spectrum-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #D4A843, #B76E79);
    border-radius: 4px;
    transition: width 1.5s ease;
}

.spectrum-fill.active {
    width: 62%;
}

.spectrum-marker {
    position: absolute;
    top: -8px;
    left: 62%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.6s ease 1s;
}

.spectrum-marker.active {
    opacity: 1;
}

.marker-label {
    display: block;
    font-family: 'Red Hat Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    color: #C62D42;
    white-space: nowrap;
    position: relative;
    top: -16px;
    text-align: center;
}

.marker-label::after {
    content: '';
    display: block;
    width: 2px;
    height: 24px;
    background: #C62D42;
    margin: 4px auto 0;
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: #C0C0C8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 24px;
}

/* ============================================
   CODE BLOCK
   ============================================ */
.code-block {
    background: #1E1E24;
    border: 1px solid #D4A843;
    border-radius: 0;
    padding: 32px;
    margin: 32px 0;
    max-width: 680px;
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4A843, #C0C0C8, #B76E79);
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Red Hat Mono', monospace;
    font-size: clamp(13px, 1.2vw, 15px);
    line-height: 1.8;
    color: #FFF8F0;
    tab-size: 2;
}

.closing-note {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.5;
    color: #1E1E24;
    margin-top: 40px;
    max-width: 680px;
}

/* ============================================
   FOOTER
   ============================================ */
#site-footer {
    padding: 40px 5vw;
    background: #1E1E24;
}

#site-footer .metallic-rule {
    width: 100%;
    margin-bottom: 30px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
}

.footer-logo {
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 900;
    font-size: 28px;
    background: linear-gradient(90deg, #D4A843, #C0C0C8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dot-ai-small {
    background: repeating-radial-gradient(
        circle at 30% 30%,
        #FFF8F0 0px,
        #D4A843 1px,
        #B76E79 2px,
        #C0C0C8 3px,
        transparent 4px
    );
    background-size: 4px 4px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    font-family: 'Red Hat Text', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #C0C0C8;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .tutorial-cards {
        flex-direction: column;
        align-items: flex-start;
    }

    .value-card {
        width: 100%;
        max-width: 300px;
        height: auto;
        padding: 24px;
    }

    .tutorial-step {
        flex-direction: column;
        gap: 12px;
    }

    .step-number {
        font-size: 36px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .spectrum-marker {
        left: 62%;
    }
}

@media (max-width: 480px) {
    .tutorial-section {
        padding: 60px 4vw 80px;
    }

    #hero-title {
        font-size: clamp(48px, 12vw, 120px);
    }
}
