/* ppuzzl.bid - Evolved-Minimal Candy Auction */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #FAF6F0;
    color: #4A4A5A;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3 {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    color: #1A1A2E;
}

/* === Header === */
.site-header {
    text-align: center;
    padding: 80px 24px 40px;
    position: relative;
}

.header-inner {
    opacity: 0;
    transform: translateY(20px);
    animation: headerFadeIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.site-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    color: #1A1A2E;
    letter-spacing: 0.25em;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.site-title::before,
.site-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: #C8A878;
}

.site-title::before {
    right: calc(100% + 20px);
}

.site-title::after {
    left: calc(100% + 20px);
}

.site-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: #4A4A5A;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: taglineFadeIn 1s 0.6s ease forwards;
}

.header-deco-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C8A878, transparent);
    margin: 30px auto 0;
    opacity: 0;
    animation: decoLineIn 0.8s 0.9s ease forwards;
}

/* === Auction Intro === */
.auction-intro {
    text-align: center;
    padding: 20px 24px 50px;
    opacity: 0;
    animation: introFadeIn 1s 0.4s ease forwards;
}

.intro-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: #4A4A5A;
    max-width: 500px;
    margin: 0 auto;
}

/* === Auction Grid === */
.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* === Lot Card === */
.lot-card {
    background: #FFFBF5;
    border: 1px solid #E8D8C8;
    border-radius: 6px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform 300ms ease, box-shadow 300ms ease;
    opacity: 0;
    transform: translateY(30px);
}

.lot-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lot-card:hover {
    transform: scale(1.015);
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.06);
}

.lot-card.visible:hover {
    transform: scale(1.015);
}

/* === Watercolor Washes === */
.card-watercolor-wash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.wash-rose {
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, #E85A8A 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 70% 60%, #E85A8A 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 80%, #E85A8A 0%, transparent 55%);
}

.wash-mint {
    background:
        radial-gradient(ellipse 70% 70% at 30% 40%, #5ECEB0 0%, transparent 65%),
        radial-gradient(ellipse 80% 50% at 75% 70%, #5ECEB0 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 50% 20%, #5ECEB0 0%, transparent 50%);
}

.wash-lemon {
    background:
        radial-gradient(ellipse 60% 70% at 40% 35%, #F0D850 0%, transparent 65%),
        radial-gradient(ellipse 70% 60% at 65% 65%, #F0D850 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 25% 75%, #F0D850 0%, transparent 50%);
}

/* === Cultural Pattern Border === */
.card-cultural-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
}

.card-cultural-border::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid #C8A878;
    border-radius: 3px;
}

.card-cultural-border::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid #C8A878;
    border-radius: 2px;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 6px, #C8A878 6px, #C8A878 7px, transparent 7px, transparent 13px),
        repeating-linear-gradient(90deg, transparent, transparent 6px, #C8A878 6px, #C8A878 7px, transparent 7px, transparent 13px);
    background-size: 7px 100%, 100% 7px;
    background-position: 0 0, 0 0;
    background-repeat: repeat;
    mask-image: linear-gradient(to bottom, transparent 2px, black 2px, black calc(100% - 2px), transparent calc(100% - 2px));
    -webkit-mask-image: linear-gradient(to bottom, transparent 2px, black 2px, black calc(100% - 2px), transparent calc(100% - 2px));
}

/* Greek key corner motifs */
.lot-card:nth-child(odd) .card-cultural-border::after {
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 4px, #C8A878 4px, #C8A878 5px, transparent 5px, transparent 9px),
        repeating-linear-gradient(-45deg, transparent, transparent 4px, #C8A878 4px, #C8A878 5px, transparent 5px, transparent 9px);
    background-size: 9px 9px;
}

/* === Card Content === */
.card-content {
    position: relative;
    z-index: 2;
}

.lot-number {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: #C8A878;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 12px;
}

.lot-title {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    color: #1A1A2E;
    margin-bottom: 10px;
    line-height: 1.3;
}

.lot-description {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.82rem, 0.95vw, 0.92rem);
    color: #4A4A5A;
    line-height: 1.7;
    margin-bottom: 16px;
}

.lot-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.lot-pieces,
.lot-edition {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #4A4A5A;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    background: #FAF6F0;
    border-radius: 3px;
    border: 1px solid #E8D8C8;
}

/* === Bid Section === */
.bid-section {
    padding-top: 16px;
    border-top: 1px solid #E8D8C8;
}

.bid-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.72rem;
    color: #4A4A5A;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.bid-amount {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.6rem;
    color: #E85A8A;
    display: block;
    margin-bottom: 10px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.bid-amount.morphing {
    transform: scale(1.15);
    color: #5ECEB0;
}

.bid-bar {
    width: 100%;
    height: 3px;
    background: #E8D8C8;
    border-radius: 2px;
    overflow: hidden;
}

.bid-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #E85A8A, #5ECEB0);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === Auction Footer Section === */
.auction-footer-section {
    text-align: center;
    padding: 40px 24px 80px;
}

.deco-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
    position: relative;
}

.deco-diamond {
    flex-shrink: 0;
}

.deco-line-left,
.deco-line-right {
    display: block;
    width: 60px;
    height: 1px;
    background: #C8A878;
    opacity: 0.4;
}

.footer-note {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #4A4A5A;
    margin-bottom: 10px;
}

.footer-domain {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    font-size: 1.1rem;
    color: #1A1A2E;
    letter-spacing: 0.15em;
}

/* === Animations === */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes taglineFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes decoLineIn {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
        width: 60px;
    }
}

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

/* Card bid pulse for active bids */
@keyframes bidPulse {
    0% { box-shadow: 0 0 0 0 rgba(232, 90, 138, 0.15); }
    70% { box-shadow: 0 0 0 8px rgba(232, 90, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 90, 138, 0); }
}

.lot-card.bid-active {
    animation: bidPulse 2s ease infinite;
}

/* === Responsive === */
@media (max-width: 640px) {
    .site-header {
        padding: 60px 20px 30px;
    }

    .site-title::before,
    .site-title::after {
        width: 24px;
    }

    .site-title::before {
        right: calc(100% + 12px);
    }

    .site-title::after {
        left: calc(100% + 12px);
    }

    .auction-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px 60px;
    }

    .lot-card {
        padding: 22px;
    }

    .lot-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .auction-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
