/* prototype.moe - Y2K Chrome meets Fairycore Sketches */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-cream: #FFF8F0;
    --chrome-silver: #C0C0D8;
    --chrome-light: #e8e8f0;
    --chrome-mid: #ffffff;
    --chrome-dark: #b0b0c8;
    --iridescent-pink: #FFB6D9;
    --iridescent-lavender: #D8B4FE;
    --y2k-cyan: #7DF9FF;
    --sketch-graphite: #4A4A5A;
    --warm-peach: #FFDAB9;
    --deep-plum: #2D1B3D;
    --line-color: #e8e0d8;
    --gallery-bg-light: #e8e8f0;
    --gallery-bg-dark: #c8c8e0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    color: var(--sketch-graphite);
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* =====================
   IRIDESCENT SHIMMER
   ===================== */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--float-rotation, 0deg)); }
    50% { transform: translateY(-8px) rotate(var(--float-rotation, 0deg)); }
}

@keyframes floatAlt {
    0%, 100% { transform: translateY(0px) rotate(var(--float-rotation, 0deg)); }
    50% { transform: translateY(8px) rotate(var(--float-rotation, 0deg)); }
}

@keyframes bounceIn {
    0% { transform: translateY(60px) scale(0.8); opacity: 0; }
    60% { transform: translateY(-10px) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes lineDrawIn {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.8; transform: scale(1.2) rotate(15deg); }
}

@keyframes sweepShine {
    0% { transform: translateX(-200%); }
    100% { transform: translateX(300%); }
}

/* =====================
   SECTION 1: WORKSHOP DESK
   ===================== */
.section-workshop {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    animation: fadeInCream 0.8s ease forwards;
}

@keyframes fadeInCream {
    from { opacity: 0; background-color: #ffffff; }
    to { opacity: 1; background-color: var(--bg-cream); }
}

/* Notebook ruled lines */
.notebook-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.notebook-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 27px,
        var(--line-color) 27px,
        var(--line-color) 28px
    );
    opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
}

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

.workshop-title {
    text-align: center;
    z-index: 10;
    opacity: 0;
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
}

.site-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--deep-plum);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--iridescent-pink), var(--iridescent-lavender), var(--y2k-cyan));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
}

.site-subtitle {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--sketch-graphite);
    opacity: 0.6;
    margin-bottom: 12px;
}

.meta-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--chrome-dark);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Floating chrome capsules */
.float-capsule {
    position: absolute;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
    box-shadow: 0 4px 20px rgba(192, 192, 216, 0.4);
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease;
}

.float-capsule.visible {
    opacity: 1;
}

.capsule-1 {
    width: 80px;
    height: 36px;
    top: 20%;
    right: 15%;
    --float-rotation: 8deg;
    animation: float 3.5s ease-in-out infinite;
}

.capsule-2 {
    width: 60px;
    height: 28px;
    bottom: 25%;
    left: 10%;
    --float-rotation: -5deg;
    animation: floatAlt 4s ease-in-out infinite;
}

/* Floating stars */
.float-star {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease;
}

.float-star.visible {
    opacity: 1;
}

.float-star::before,
.float-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.float-star::before {
    background: rgba(255, 182, 217, 0.5);
}

.float-star::after {
    transform: translate(-50%, -50%) rotate(35deg);
    background: rgba(216, 180, 254, 0.3);
}

.star-1 {
    top: 15%;
    left: 20%;
    animation: starTwinkle 3s ease-in-out infinite;
}

.star-2 {
    top: 35%;
    right: 25%;
    width: 14px;
    height: 14px;
    animation: starTwinkle 2.5s ease-in-out 0.5s infinite;
}

.star-3 {
    bottom: 30%;
    right: 10%;
    width: 16px;
    height: 16px;
    animation: starTwinkle 4s ease-in-out 1s infinite;
}

/* Sketch character (CSS-only) */
.sketch-character {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
}

.section-workshop .sketch-char-hero {
    position: absolute;
    right: 18%;
    bottom: 30%;
    z-index: 5;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.sk-head {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px dashed var(--sketch-graphite);
    margin-bottom: -4px;
}

.sk-head-small {
    width: 22px;
    height: 22px;
}

.sk-head-tilt {
    transform: rotate(15deg);
}

.sk-body {
    width: 24px;
    height: 36px;
    border: 2px dashed var(--sketch-graphite);
    border-radius: 8px 8px 4px 4px;
}

.sk-body-tall {
    height: 44px;
}

.sk-body-wide {
    width: 32px;
    height: 30px;
    border-radius: 12px;
}

.sk-arm {
    position: absolute;
    width: 18px;
    height: 2px;
    border-top: 2px dashed var(--sketch-graphite);
    top: 38px;
}

.sk-arm-l {
    left: -12px;
    transform: rotate(-20deg);
}

.sk-arm-r {
    right: -12px;
    transform: rotate(20deg);
}

.sk-arm-up {
    transform: rotate(-70deg) !important;
    top: 28px;
}

/* Chrome versions */
.chrome-head {
    border-style: solid;
    border-color: var(--chrome-silver);
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
}

.chrome-body {
    border-style: solid;
    border-color: var(--chrome-silver);
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
}

/* =====================
   SECTION 2: CHARACTER SKETCHES
   ===================== */
.section-sketches {
    position: relative;
    min-height: 250vh;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.sketch-card {
    width: 90%;
    max-width: 500px;
    background: var(--bg-cream);
    padding: 0;
    position: relative;
    opacity: 0;
    transform: scale(0.9) rotate(calc(var(--card-rotation, 0deg) + 3deg));
    transition: opacity 0.5s ease, transform 0.5s ease;
    clip-path: polygon(
        0% 2%, 3% 0%, 8% 1%, 15% 0%, 22% 1.5%, 30% 0%, 38% 0.8%, 45% 0%, 52% 1%, 60% 0.3%, 68% 1.5%, 75% 0%, 82% 0.5%, 90% 0%, 95% 1%, 100% 0%,
        100% 98%, 97% 100%, 92% 99%, 85% 100%, 78% 98.5%, 70% 100%, 62% 99.2%, 55% 100%, 48% 99%, 40% 99.7%, 32% 98.5%, 25% 100%, 18% 99.5%, 10% 100%, 5% 99%, 0% 100%
    );
    box-shadow: 0 8px 32px rgba(74, 74, 90, 0.12);
}

.sketch-card.revealed {
    opacity: 1;
    transform: scale(1) rotate(var(--card-rotation, 0deg));
}

.card-left {
    align-self: flex-start;
    margin-left: 10%;
}

.card-right {
    align-self: flex-end;
    margin-right: 10%;
}

.card-inner {
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 27px,
        var(--line-color) 27px,
        var(--line-color) 28px
    );
}

.card-name {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--deep-plum);
    margin-top: 20px;
    margin-bottom: 8px;
}

.card-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--sketch-graphite);
    max-width: 400px;
    margin-bottom: 12px;
}

.card-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--chrome-dark);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* =====================
   SECTION 3: CHROME GALLERY
   ===================== */
.section-gallery {
    position: relative;
    min-height: 100vh;
    padding: 100px 40px;
    background: linear-gradient(135deg, var(--gallery-bg-light), var(--gallery-bg-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    transition: background-color 1.5s ease;
}

.gallery-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-200%);
    pointer-events: none;
    z-index: 5;
}

.gallery-shine.sweep {
    animation: sweepShine 2s ease-out forwards;
}

.gallery-heading {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--deep-plum);
    margin-bottom: 8px;
    z-index: 2;
}

.gallery-subtext {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    color: var(--sketch-graphite);
    opacity: 0.7;
    margin-bottom: 60px;
    z-index: 2;
}

.chrome-frames {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 2;
}

.chrome-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.chrome-frame.revealed {
    opacity: 1;
    transform: scale(1);
}

.frame-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
    padding: 6px;
    box-shadow: 0 4px 24px rgba(192, 192, 216, 0.5), inset 0 1px 2px rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.frame-character {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.frame-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sketch-graphite);
}

/* =====================
   SECTION 4: CAPSULE MACHINE
   ===================== */
.section-capsule {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    padding: 80px 40px;
}

.gashapon-machine {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 260px;
}

.gashapon-dome {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 182, 217, 0.25), rgba(216, 180, 254, 0.15), transparent 70%);
    border: 4px solid var(--chrome-silver);
    position: relative;
    z-index: 2;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gashapon-dome.assembled {
    opacity: 1;
    transform: translateY(0);
}

.capsule-ball {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: inset -3px -3px 6px rgba(0,0,0,0.1), 1px 1px 4px rgba(0,0,0,0.1);
}

.ball-1 { background: var(--iridescent-pink); top: 55%; left: 25%; }
.ball-2 { background: var(--iridescent-lavender); top: 60%; left: 50%; }
.ball-3 { background: var(--y2k-cyan); top: 50%; right: 22%; }
.ball-4 { background: var(--warm-peach); top: 65%; left: 35%; }
.ball-5 { background: var(--chrome-silver); top: 70%; right: 35%; }

.gashapon-body {
    width: 220px;
    height: 160px;
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
    border-radius: 12px 12px 8px 8px;
    margin-top: -20px;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(192, 192, 216, 0.4);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gashapon-body.assembled {
    opacity: 1;
    transform: translateY(0);
}

.gashapon-crank {
    position: absolute;
    right: -40px;
    top: 220px;
    z-index: 3;
    opacity: 0;
    transform: rotate(-30deg);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gashapon-crank.assembled {
    opacity: 1;
    transform: rotate(0deg);
}

.crank-arm {
    width: 36px;
    height: 6px;
    background: var(--chrome-silver);
    border-radius: 3px;
}

.crank-knob {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8e8f0, #ffffff 40%, #b0b0c8);
    border: 2px solid var(--chrome-silver);
    position: absolute;
    right: -8px;
    top: -5px;
}

.gashapon-tray {
    width: 180px;
    min-height: 60px;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    z-index: 4;
}

.output-capsule {
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.output-capsule.dropped {
    opacity: 1;
    transform: scale(1);
}

.capsule-message {
    background: linear-gradient(135deg, var(--iridescent-pink), var(--iridescent-lavender), var(--y2k-cyan));
    background-size: 200% 200%;
    animation: shimmer 8s ease-in-out infinite;
    border-radius: 20px;
    padding: 24px 28px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 8px 24px rgba(216, 180, 254, 0.3);
}

.farewell-text {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--deep-plum);
    margin-bottom: 8px;
}

.farewell-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--deep-plum);
    opacity: 0.6;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .card-left,
    .card-right {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .chrome-frames {
        flex-direction: column;
        align-items: center;
    }

    .section-workshop .sketch-char-hero {
        right: 10%;
        bottom: 20%;
    }

    .gashapon-crank {
        right: -20px;
    }
}
