/* =============================================
   SIMIDIOT.COM - Watercolor Gallery of Beautiful Failures
   Colors: #c4795a #c88a8a #7a9e78 #f5ede0 #faf6ef #4a3228 #d4a84c
   Fonts: Courier Prime, Nunito Sans, Permanent Marker
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f5ede0;
    color: #4a3228;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* --- SVG Filters (hidden) --- */
#svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Floating Bubbles --- */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: bubbleFloat linear infinite;
}

@keyframes bubbleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-10vh) translateX(var(--drift-x, 50px)) scale(1);
        opacity: 0;
    }
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    background-color: #f5ede0;
}

.hero-watercolor-stains {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    animation: stainsFadeIn 800ms ease-out forwards;
}

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

.stain {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
}

.stain-1 {
    width: 400px;
    height: 350px;
    background: radial-gradient(ellipse at 40% 50%, #c4795a 0%, transparent 70%);
    top: 10%;
    left: 5%;
    opacity: 0.15;
}

.stain-2 {
    width: 350px;
    height: 300px;
    background: radial-gradient(ellipse at 60% 40%, #7a9e78 0%, transparent 70%);
    top: 60%;
    right: 10%;
    opacity: 0.12;
}

.stain-3 {
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 50%, #d4a84c 0%, transparent 65%);
    bottom: 15%;
    left: 40%;
    opacity: 0.1;
}

.stain-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(ellipse at 55% 45%, #c88a8a 0%, transparent 70%);
    top: 30%;
    right: 25%;
    opacity: 0.12;
}

.stain-5 {
    width: 300px;
    height: 280px;
    background: radial-gradient(ellipse at 45% 55%, #c4795a 0%, transparent 68%);
    top: 5%;
    right: 5%;
    opacity: 0.08;
}

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

/* --- Hero Title Letters --- */
#hero-title {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: clamp(48px, 12vw, 140px);
    letter-spacing: 0.05em;
    line-height: 1.1;
    display: inline-block;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
    position: relative;
    -webkit-background-clip: text;
    background-clip: text;
}

.letter.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.letter-s {
    color: #c4795a;
    text-shadow: 2px 3px 8px rgba(196, 121, 90, 0.35);
}

.letter-i1 {
    color: #4a3228;
    opacity: 0.85;
    text-shadow: 1px 2px 6px rgba(74, 50, 40, 0.25);
}

.letter-m {
    color: #7a9e78;
    text-shadow: 2px 3px 10px rgba(122, 158, 120, 0.3);
}

.letter-i2 {
    color: #d4a84c;
    text-shadow: 1px 2px 8px rgba(212, 168, 76, 0.35);
}

.letter-d {
    color: #c4795a;
    text-shadow: 2px 3px 8px rgba(196, 121, 90, 0.3);
}

.letter-i3 {
    color: #c88a8a;
    text-shadow: 1px 2px 6px rgba(200, 138, 138, 0.35);
}

.letter-o {
    color: #7a9e78;
    text-shadow: 2px 3px 10px rgba(122, 158, 120, 0.35);
}

.letter-t {
    color: #4a3228;
    text-shadow: 1px 2px 6px rgba(74, 50, 40, 0.3);
}

/* Watercolor bleed effect on letters */
.letter::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    width: 80%;
    height: 6px;
    background: currentColor;
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(4px);
}

/* --- Hero Subtitle --- */
#hero-subtitle {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(16px, 2.5vw, 28px);
    color: #4a3228;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
    margin-top: 20px;
    letter-spacing: 0.02em;
}

#hero-subtitle.visible {
    opacity: 0.8;
    transform: translateY(0);
}

/* --- Scroll Hint --- */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    z-index: 2;
    opacity: 0;
    animation: scrollHintAppear 600ms ease-out 3200ms forwards, scrollBounce 2s ease-in-out 3800ms infinite;
}

@keyframes scrollHintAppear {
    to { opacity: 0.5; }
}

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

/* --- Drip Dividers --- */
.drip-divider {
    width: 100%;
    line-height: 0;
    margin-top: -2px;
    position: relative;
    z-index: 2;
}

.drip-divider svg {
    width: 100%;
    height: 60px;
    display: block;
}

.drip-1 {
    transform: scaleY(1);
}

.drip-2 {
    transform: scaleY(1);
}

/* --- Gallery Section --- */
#gallery {
    position: relative;
    z-index: 2;
    padding: 60px 5% 80px;
    background-color: #f5ede0;
}

.gallery-heading {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 52px);
    text-align: center;
    color: #4a3228;
    margin-bottom: 50px;
    position: relative;
}

.gallery-heading::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #c4795a, #d4a84c, #7a9e78);
    margin: 15px auto 0;
    border-radius: 2px;
    opacity: 0.6;
}

/* --- Masonry Grid --- */
.masonry-grid {
    columns: 3;
    column-gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .masonry-grid {
        columns: 2;
        column-gap: 20px;
    }
}

@media (max-width: 560px) {
    .masonry-grid {
        columns: 1;
        column-gap: 0;
    }
}

/* --- Masonry Cards --- */
.masonry-card {
    break-inside: avoid;
    position: relative;
    margin-bottom: 28px;
    border-radius: 4px;
    overflow: visible;
    cursor: default;
    transition: transform 100ms ease-out;
    transform-style: preserve-3d;
    perspective: 800px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
}

.masonry-card:hover {
    z-index: 10;
}

/* Card watercolor backgrounds */
.card-watercolor-bg {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 8px;
    z-index: 0;
    pointer-events: none;
}

.card-bg-1 {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(196, 121, 90, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(122, 158, 120, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 168, 76, 0.08) 0%, transparent 65%);
    background-color: #faf6ef;
}

.card-bg-2 {
    background:
        radial-gradient(ellipse at 70% 20%, rgba(122, 158, 120, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 80%, rgba(200, 138, 138, 0.10) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-3 {
    background:
        radial-gradient(ellipse at 50% 40%, rgba(212, 168, 76, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 70%, rgba(196, 121, 90, 0.10) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-4 {
    background:
        radial-gradient(ellipse at 80% 30%, rgba(200, 138, 138, 0.13) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 60%, rgba(122, 158, 120, 0.09) 0%, transparent 55%);
    background-color: #faf6ef;
}

.card-bg-5 {
    background:
        radial-gradient(ellipse at 30% 25%, rgba(196, 121, 90, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 75%, rgba(212, 168, 76, 0.11) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(122, 158, 120, 0.07) 0%, transparent 70%);
    background-color: #faf6ef;
}

.card-bg-6 {
    background:
        radial-gradient(ellipse at 60% 40%, rgba(122, 158, 120, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 70%, rgba(212, 168, 76, 0.09) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-7 {
    background:
        radial-gradient(ellipse at 40% 20%, rgba(200, 138, 138, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 121, 90, 0.10) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-8 {
    background:
        radial-gradient(ellipse at 50% 30%, rgba(212, 168, 76, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 60%, rgba(200, 138, 138, 0.08) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-9 {
    background:
        radial-gradient(ellipse at 25% 35%, rgba(196, 121, 90, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 65%, rgba(122, 158, 120, 0.11) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 90%, rgba(212, 168, 76, 0.08) 0%, transparent 65%);
    background-color: #faf6ef;
}

.card-bg-10 {
    background:
        radial-gradient(ellipse at 65% 25%, rgba(122, 158, 120, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 35% 75%, rgba(196, 121, 90, 0.10) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-11 {
    background:
        radial-gradient(ellipse at 45% 55%, rgba(200, 138, 138, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 168, 76, 0.09) 0%, transparent 60%);
    background-color: #faf6ef;
}

.card-bg-12 {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(212, 168, 76, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 60%, rgba(196, 121, 90, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(122, 158, 120, 0.08) 0%, transparent 65%);
    background-color: #faf6ef;
}

/* Card with watercolor filter */
.masonry-card:nth-child(odd) .card-watercolor-bg {
    filter: url(#watercolor-distort);
}

.masonry-card:nth-child(3n) .card-watercolor-bg {
    filter: url(#watercolor-distort-heavy);
}

/* Card content */
.card-content {
    position: relative;
    z-index: 1;
    padding: 30px 28px;
}

.card-label {
    font-family: 'Permanent Marker', cursive;
    font-size: 13px;
    color: #c4795a;
    display: inline-block;
    margin-bottom: 8px;
    transform: rotate(-2deg);
    letter-spacing: 0.03em;
}

.masonry-card:nth-child(even) .card-label {
    color: #7a9e78;
}

.masonry-card:nth-child(3n) .card-label {
    color: #d4a84c;
}

.card-content h3 {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.3;
    color: #4a3228;
    margin-bottom: 12px;
}

.card-content p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.75;
    color: #4a3228;
    opacity: 0.88;
}

.card-annotation {
    display: inline-block;
    font-family: 'Permanent Marker', cursive;
    font-size: 12px;
    color: #c88a8a;
    margin-top: 12px;
    transform: rotate(1.5deg);
    opacity: 0.75;
    position: relative;
}

.card-annotation::before {
    content: '~ ';
}

.card-annotation::after {
    content: ' ~';
}

/* Card size variations */
.card-large .card-content {
    padding: 36px 32px;
}

.card-small .card-content {
    padding: 22px 22px;
}

.card-small .card-content h3 {
    font-size: clamp(16px, 1.8vw, 20px);
}

/* Card hover shadow tilt effect */
.masonry-card:hover {
    box-shadow: 4px 6px 20px rgba(74, 50, 40, 0.08);
}

/* --- Manifesto Section --- */
#manifesto {
    position: relative;
    z-index: 2;
    padding: 100px 8% 120px;
    background-color: #f5ede0;
    text-align: center;
    overflow: hidden;
}

.manifesto-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

#manifesto h2 {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 52px);
    color: #4a3228;
    margin-bottom: 40px;
}

#manifesto blockquote {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(16px, 2.2vw, 24px);
    line-height: 1.7;
    color: #c4795a;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
}

#manifesto blockquote::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c4795a, transparent);
    opacity: 0.5;
}

.manifesto-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.9;
    color: #4a3228;
    margin-bottom: 20px;
    opacity: 0.9;
}

.manifesto-text em {
    font-weight: 600;
    color: #7a9e78;
    font-style: italic;
}

/* Paint splatters */
.splatter {
    position: absolute;
    border-radius: 50%;
    filter: blur(25px);
    pointer-events: none;
}

.splatter-1 {
    width: 200px;
    height: 180px;
    background: radial-gradient(ellipse at center, rgba(196, 121, 90, 0.15) 0%, transparent 70%);
    top: 20%;
    left: 5%;
}

.splatter-2 {
    width: 160px;
    height: 160px;
    background: radial-gradient(ellipse at center, rgba(122, 158, 120, 0.12) 0%, transparent 70%);
    bottom: 15%;
    right: 8%;
}

.splatter-3 {
    width: 220px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(212, 168, 76, 0.1) 0%, transparent 65%);
    top: 50%;
    right: 20%;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 2;
    padding: 50px 8% 40px;
    background-color: #4a3228;
    text-align: center;
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-tagline {
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #f5ede0;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-note {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(12px, 1.2vw, 15px);
    color: #c88a8a;
    opacity: 0.7;
}

.footer-stains {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.footer-stain-1 {
    width: 300px;
    height: 250px;
    background: radial-gradient(ellipse at center, rgba(196, 121, 90, 0.1) 0%, transparent 70%);
    top: -50px;
    left: 10%;
    filter: blur(30px);
}

.footer-stain-2 {
    width: 250px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(122, 158, 120, 0.08) 0%, transparent 70%);
    bottom: -30px;
    right: 15%;
    filter: blur(30px);
}

/* --- Scroll-triggered card reveal --- */
.masonry-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.masonry-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery heading reveal */
.gallery-heading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

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

/* Manifesto reveal */
.manifesto-content {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
}

.manifesto-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Selection color --- */
::selection {
    background: rgba(196, 121, 90, 0.25);
    color: #4a3228;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    #hero-title {
        font-size: clamp(40px, 14vw, 80px);
    }

    #hero-subtitle {
        font-size: clamp(14px, 3.5vw, 20px);
    }

    .card-content {
        padding: 22px 20px;
    }

    #manifesto {
        padding: 70px 6% 80px;
    }

    .drip-divider svg {
        height: 40px;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: clamp(36px, 16vw, 60px);
        letter-spacing: 0.02em;
    }

    .gallery-heading {
        font-size: clamp(22px, 6vw, 36px);
    }

    .masonry-grid {
        padding: 0 2%;
    }
}
