/* ===================================================
   ppuzzl.net — Swiss Earth-Tone Network
   Colors: #2A2418, #5A5040, #8A7A60, #C0B498, #D8CDB8,
           #F0E8D8, #F8F0E0, #FBF6EE, #FFFBF4
   Fonts: Nunito (300,400,600,800), IBM Plex Mono (500)
   =================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #5A5040;
    background-color: #FBF6EE;
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
}

/* --- Gradient Mesh Background --- */
.gradient-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 600px 500px at 20% 30%, rgba(192, 180, 152, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 500px 600px at 80% 60%, rgba(138, 122, 96, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 700px 400px at 50% 80%, rgba(216, 205, 184, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 400px 500px at 10% 70%, rgba(240, 232, 216, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 90% 20%, rgba(192, 180, 152, 0.04) 0%, transparent 70%);
}

/* --- Circuit Pattern SVG --- */
.circuit-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

/* --- Skeleton Shimmer Animation --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

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

@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: translateY(32px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes labelSlide {
    0% {
        opacity: 0;
        letter-spacing: 0.5em;
    }
    100% {
        opacity: 1;
        letter-spacing: 0.25em;
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 32px;
}

.hero-inner {
    max-width: 720px;
}

.hero-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    color: #8A7A60;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    animation: labelSlide 1s ease-out 0.3s forwards;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #2A2418;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    opacity: 0;
    animation: heroReveal 1.2s ease-out 0.6s forwards;
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    color: #5A5040;
    line-height: 1.85;
    max-width: 560px;
    margin: 0 auto;
    opacity: 0;
    animation: heroReveal 1.2s ease-out 0.9s forwards;
}

/* --- Section Styling --- */
.card-grid-section,
.system-section,
.architecture-section {
    position: relative;
    z-index: 1;
    padding: 96px 32px;
    max-width: 1120px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    color: #8A7A60;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: #2A2418;
    line-height: 1.15;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: #FFFBF4;
    border: 1px solid #D8CDB8;
    border-radius: 12px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background:
        radial-gradient(ellipse 200px 150px at 30% 40%, rgba(192, 180, 152, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 150px 200px at 70% 60%, rgba(138, 122, 96, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(42, 36, 24, 0.08);
}

/* --- Card Skeleton --- */
.card-skeleton {
    position: absolute;
    top: 32px;
    left: 32px;
    right: 32px;
    bottom: 32px;
    z-index: 2;
    transition: opacity 0.6s ease;
}

.card.revealed .card-skeleton {
    opacity: 0;
    pointer-events: none;
}

.skeleton-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #F0E8D8 25%, #F8F0E0 50%, #F0E8D8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-line--title {
    width: 60%;
    height: 16px;
    margin-bottom: 16px;
}

.skeleton-line--text {
    width: 100%;
    height: 10px;
    margin-bottom: 10px;
}

.skeleton-line--short {
    width: 70%;
}

/* --- Card Content --- */
.card-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease 0.1s;
}

.card.revealed .card-content {
    opacity: 1;
}

.card-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.65rem;
    color: #8A7A60;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: #2A2418;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: #5A5040;
    line-height: 1.85;
    margin-bottom: 16px;
}

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

.card-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.6rem;
    color: #8A7A60;
    letter-spacing: 0.15em;
    background: #F0E8D8;
    padding: 4px 10px;
    border-radius: 4px;
}

/* --- System Stats Section --- */
.system-section {
    border-top: 1px solid #D8CDB8;
    border-bottom: 1px solid #D8CDB8;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    text-align: center;
}

.system-stat {
    padding: 32px 16px;
    background: #FFFBF4;
    border: 1px solid #D8CDB8;
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: #2A2418;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.65rem;
    color: #8A7A60;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* --- Architecture Section --- */
.architecture-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.architecture-block {
    background: #FFFBF4;
    border: 1px solid #D8CDB8;
    border-radius: 12px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.architecture-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C0B498, #8A7A60, #C0B498);
    border-radius: 12px 12px 0 0;
}

.architecture-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.4vw, 1.25rem);
    color: #2A2418;
    margin-bottom: 12px;
    line-height: 1.3;
}

.architecture-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: #5A5040;
    line-height: 1.85;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    padding: 48px 32px;
    text-align: center;
    border-top: 1px solid #D8CDB8;
}

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

.footer-brand {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #2A2418;
    letter-spacing: 0.06em;
}

.footer-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.65rem;
    color: #8A7A60;
    letter-spacing: 0.2em;
}

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .architecture-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .system-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .architecture-content {
        grid-template-columns: 1fr;
    }

    .system-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
    }

    .hero {
        padding: 48px 24px;
    }

    .card-grid-section,
    .system-section,
    .architecture-section {
        padding: 64px 24px;
    }
}
