/* ppuzzl.net - Holographic Vintage Design */

/* ===== CSS Custom Properties ===== */
:root {
    --deep-mahogany: #4a2510;
    --off-white: #f8f4ea;
    --gold-accent: #c9a227;
    --warm-brown: #8b6914;
    --copper: #c87941;
    --vintage-gray: #9a8a75;
    --aged-sepia: #f5e6cc;

    --font-primary: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', 'Times New Roman', serif;
    --font-accent: 'Courier Prime', 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--aged-sepia);
    color: var(--deep-mahogany);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ===== Grain Overlay ===== */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== Header ===== */
.site-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(180deg, var(--off-white) 0%, var(--aged-sepia) 100%);
    position: relative;
}

.header-ornament {
    font-size: 1.5rem;
    color: var(--gold-accent);
    margin: 8px 0;
    letter-spacing: 0.5em;
}

.site-title {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    color: var(--deep-mahogany);
    letter-spacing: 0.02em;
    margin: 10px 0;
    text-shadow: 2px 2px 0 rgba(201, 162, 39, 0.2);
}

.title-dot {
    color: var(--gold-accent);
}

.site-tagline {
    font-family: var(--font-accent);
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: var(--vintage-gray);
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Hero Section ===== */
.hero-section {
    padding: 40px 0 60px;
    display: flex;
    justify-content: center;
}

.hero-frame {
    width: 100%;
    max-width: 800px;
    padding: 6px;
    background: linear-gradient(135deg, var(--copper) 0%, var(--warm-brown) 50%, var(--copper) 100%);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(74, 37, 16, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-inner {
    position: relative;
    background: var(--off-white);
    border-radius: 2px;
    padding: 60px 40px;
    overflow: hidden;
}

.holographic-sheen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        125deg,
        rgba(255, 0, 0, 0.08) 0%,
        rgba(255, 154, 0, 0.08) 15%,
        rgba(208, 222, 33, 0.08) 30%,
        rgba(79, 220, 74, 0.08) 45%,
        rgba(63, 218, 216, 0.08) 60%,
        rgba(47, 201, 226, 0.08) 70%,
        rgba(28, 127, 238, 0.08) 80%,
        rgba(95, 21, 242, 0.08) 90%,
        rgba(186, 12, 248, 0.08) 100%
    );
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: color-dodge;
}

.hero-inner:hover .holographic-sheen,
.puzzle-card:hover .holographic-sheen,
.about-inner:hover .holographic-sheen {
    opacity: 1;
}

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

.ornament-top,
.ornament-bottom {
    font-size: 1.4rem;
    color: var(--gold-accent);
    margin: 12px 0;
    letter-spacing: 0.3em;
}

.hero-heading {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--deep-mahogany);
    margin: 16px 0;
    letter-spacing: 0.02em;
}

.hero-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--vintage-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== Card Grid Section ===== */
.card-grid-section {
    padding: 40px 0 60px;
}

.section-heading {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    color: var(--deep-mahogany);
    margin-bottom: 40px;
    font-weight: 700;
}

.heading-ornament {
    color: var(--gold-accent);
    font-size: 0.8em;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* ===== Puzzle Cards ===== */
.puzzle-card {
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    --card-x: 50%;
    --card-y: 50%;
}

.puzzle-card .holographic-sheen {
    background: radial-gradient(
        circle at var(--card-x) var(--card-y),
        rgba(255, 0, 0, 0.12) 0%,
        rgba(255, 154, 0, 0.1) 10%,
        rgba(208, 222, 33, 0.1) 20%,
        rgba(79, 220, 74, 0.1) 30%,
        rgba(63, 218, 216, 0.1) 40%,
        rgba(28, 127, 238, 0.1) 50%,
        rgba(95, 21, 242, 0.1) 60%,
        rgba(186, 12, 248, 0.1) 70%,
        transparent 80%
    );
    border-radius: 4px;
    mix-blend-mode: color-dodge;
}

.puzzle-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 48px rgba(74, 37, 16, 0.25), 0 0 20px rgba(201, 162, 39, 0.15);
}

.puzzle-card:hover .holographic-sheen {
    opacity: 1;
}

.card-leather-border {
    background: linear-gradient(145deg, var(--copper) 0%, var(--warm-brown) 40%, var(--copper) 100%);
    padding: 4px;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
    height: 100%;
}

.card-inner {
    background: var(--off-white);
    border-radius: 2px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-ornament-top {
    color: var(--gold-accent);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.card-ornament-bottom {
    color: var(--gold-accent);
    font-size: 0.9rem;
    margin-top: auto;
    padding-top: 12px;
}

.card-image {
    width: 100%;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(154, 138, 117, 0.3);
}

.card-image svg {
    display: block;
    width: 100%;
    height: auto;
}

.sepia-image {
    filter: sepia(0.7) saturate(0.8);
}

.card-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--deep-mahogany);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.card-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--vintage-gray);
    line-height: 1.7;
    margin-bottom: 12px;
    flex-grow: 1;
}

.card-tag {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.75rem;
    color: var(--copper);
    border: 1px solid var(--copper);
    padding: 3px 12px;
    border-radius: 2px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* ===== About Section ===== */
.about-section {
    padding: 40px 0 60px;
    display: flex;
    justify-content: center;
}

.about-frame {
    width: 100%;
    max-width: 800px;
    padding: 6px;
    background: linear-gradient(135deg, var(--gold-accent) 0%, var(--warm-brown) 50%, var(--gold-accent) 100%);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(74, 37, 16, 0.15);
}

.about-inner {
    position: relative;
    background: var(--off-white);
    border-radius: 2px;
    padding: 50px 40px;
    overflow: hidden;
}

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

.about-heading {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--deep-mahogany);
    margin: 16px 0;
    font-weight: 700;
}

.about-text {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--vintage-gray);
    max-width: 600px;
    margin: 12px auto;
    line-height: 1.8;
}

.about-text.typewriter {
    font-family: var(--font-accent);
    font-size: 0.9rem;
    color: var(--copper);
    letter-spacing: 0.05em;
    margin-top: 20px;
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 40px 20px 50px;
    background: linear-gradient(180deg, var(--aged-sepia) 0%, var(--off-white) 100%);
    border-top: 2px solid rgba(200, 121, 65, 0.2);
}

.footer-ornament {
    font-size: 1rem;
    color: var(--gold-accent);
    letter-spacing: 0.5em;
    margin-bottom: 16px;
}

.footer-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--vintage-gray);
    margin-bottom: 6px;
}

.footer-tagline {
    font-family: var(--font-accent);
    font-size: 0.8rem;
    color: var(--copper);
    letter-spacing: 0.1em;
}

/* ===== Holographic Animation on hero/about ===== */
@keyframes holographicShift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.hero-inner:hover .holographic-sheen,
.about-inner:hover .holographic-sheen {
    animation: holographicShift 3s ease-in-out infinite;
}

/* ===== Card enter animations ===== */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.puzzle-card {
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards;
}

.puzzle-card:nth-child(1) { animation-delay: 0.1s; }
.puzzle-card:nth-child(2) { animation-delay: 0.2s; }
.puzzle-card:nth-child(3) { animation-delay: 0.3s; }
.puzzle-card:nth-child(4) { animation-delay: 0.4s; }
.puzzle-card:nth-child(5) { animation-delay: 0.5s; }
.puzzle-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .site-header {
        padding: 40px 16px 30px;
    }

    .hero-inner,
    .about-inner {
        padding: 40px 24px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-inner {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2.5rem;
    }

    .hero-heading {
        font-size: 1.8rem;
    }

    .card-grid {
        gap: 16px;
    }
}
