/* ========================================
   ppuzzl.bid - Bauhaus Design System
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --bauhaus-red: #E63946;
    --bauhaus-yellow: #FFB703;
    --bauhaus-blue: #023E8A;
    --canvas-white: #FAFAF8;
    --structural-black: #1A1A1A;
    --warm-gray: #E8E4DF;
    --electric-cyan: #00F5FF;

    --font-headline: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.65;
    color: var(--structural-black);
    background-color: var(--canvas-white);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-headline);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.section-heading {
    font-size: clamp(42px, 7vw, 96px);
    color: var(--structural-black);
    margin-bottom: 60px;
    text-align: center;
}

/* ========================================
   HERO SECTION
   ======================================== */
#hero {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--canvas-white);
    position: relative;
    overflow: hidden;
}

.hero-canvas {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.shape {
    position: absolute;
    opacity: 0;
}

.shape-circle {
    top: -80px;
    left: -180px;
    transform: translateX(-200px);
}

.shape-triangle {
    top: -100px;
    left: -10px;
    transform: translateY(-200px);
}

.shape-rectangle {
    top: -60px;
    right: -180px;
    transform: translateX(200px);
}

.shape.animate-in {
    opacity: 1;
}

.shape-circle.animate-in {
    transform: translateX(0);
    transition: transform 0.8s var(--spring-ease), opacity 0.4s ease;
}

.shape-triangle.animate-in {
    transform: translateY(0);
    transition: transform 0.8s var(--spring-ease), opacity 0.4s ease;
}

.shape-rectangle.animate-in {
    transform: translateX(0);
    transition: transform 0.8s var(--spring-ease), opacity 0.4s ease;
}

.hero-wordmark {
    font-family: var(--font-headline);
    font-size: clamp(60px, 12vw, 160px);
    letter-spacing: 0.08em;
    color: var(--structural-black);
    margin-top: 80px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.hero-wordmark .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.hero-wordmark .char.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.3s var(--spring-ease);
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--structural-black);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 1.8s, transform 0.6s ease 1.8s;
    margin-top: 10px;
    position: relative;
    z-index: 2;
}

.hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   MANIFESTO SECTION
   ======================================== */
#manifesto {
    padding: 120px 24px;
    background-color: var(--canvas-white);
    position: relative;
}

#manifesto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background-color: var(--warm-gray);
}

.manifesto-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.manifesto-text {
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.65;
    margin-bottom: 28px;
    color: var(--structural-black);
}

.highlight {
    position: relative;
    font-weight: 700;
    display: inline;
}

.highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--spring-ease);
}

.highlight.revealed::after {
    transform: scaleX(1);
}

.highlight-red::after {
    background-color: var(--bauhaus-red);
}

.highlight-yellow::after {
    background-color: var(--bauhaus-yellow);
}

.highlight-blue::after {
    background-color: var(--bauhaus-blue);
}

/* ========================================
   SERVICES GRID
   ======================================== */
#services {
    padding: 120px 24px;
    background-color: var(--warm-gray);
    position: relative;
}

/* Subtle grid overlay */
#services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, var(--warm-gray) 1px, transparent 1px),
        linear-gradient(to bottom, var(--warm-gray) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.08;
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1000px;
}

/* Card Wrapper */
.card-wrapper {
    perspective: 1000px;
}

.card {
    position: relative;
    width: 100%;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}

.card-wrapper:hover .card {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 3px solid var(--structural-black);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--canvas-white);
}

.card-back {
    transform: rotateY(180deg);
    padding: 32px 28px;
}

.card-icon {
    margin-bottom: 24px;
}

.card-title {
    font-family: var(--font-headline);
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: 0.04em;
    color: var(--structural-black);
    margin-bottom: 16px;
}

.card-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--structural-black);
    opacity: 0.5;
    margin-top: auto;
}

.card-back p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--structural-black);
    text-align: center;
    margin-bottom: 20px;
}

/* Neon hover glow */
.card-wrapper:hover .card-front,
.card-wrapper:hover .card-back {
    box-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
}

/* ========================================
   TIMELINE STRIP
   ======================================== */
#timeline {
    padding: 120px 24px;
    background-color: var(--canvas-white);
    overflow: hidden;
}

.timeline-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

.timeline-track {
    display: flex;
    gap: 0;
    min-width: max-content;
    position: relative;
    padding: 0 40px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: var(--structural-black);
    opacity: 0.2;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    padding: 0 20px;
    position: relative;
    text-align: center;
}

.timeline-icon {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    transition: filter 0.3s ease;
}

.timeline-node:hover .timeline-icon {
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.5));
}

.timeline-node.active .timeline-icon {
    filter: drop-shadow(0 0 12px rgba(0, 245, 255, 0.6));
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--structural-black);
    font-weight: 400;
    margin-bottom: 8px;
}

.timeline-desc {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--structural-black);
    opacity: 0.75;
    max-width: 160px;
}

/* ========================================
   FOOTER
   ======================================== */
#footer {
    background-color: var(--structural-black);
    padding: 60px 24px 40px;
    color: var(--canvas-white);
}

.footer-shapes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.footer-shape {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.footer-shape:hover {
    opacity: 1;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
}

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

.footer-brand {
    font-family: var(--font-headline);
    font-size: 28px;
    letter-spacing: 0.06em;
    color: var(--canvas-white);
}

.footer-email {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--canvas-white);
    opacity: 0.7;
    transition: color 0.3s ease;
}

.footer-email:hover {
    color: var(--electric-cyan);
    opacity: 1;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--canvas-white);
    opacity: 0.5;
}

.footer-location {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--canvas-white);
    opacity: 0.5;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.section-reveal .section-heading,
.section-reveal .manifesto-text,
.section-reveal .card-wrapper,
.section-reveal .timeline-node {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-reveal .section-heading.revealed,
.section-reveal .manifesto-text.revealed,
.section-reveal .card-wrapper.revealed,
.section-reveal .timeline-node.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .card {
        height: 340px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-meta {
        align-items: center;
    }

    .shape-circle {
        left: -100px;
    }

    .shape-rectangle {
        right: -100px;
    }
}

@media (max-width: 600px) {
    .section-heading {
        margin-bottom: 40px;
    }

    #manifesto,
    #services,
    #timeline {
        padding: 80px 16px;
    }

    .shape {
        transform: scale(0.7);
    }

    .shape-circle {
        left: -60px;
    }

    .shape-rectangle {
        right: -60px;
    }

    .hero-wordmark {
        font-size: clamp(40px, 14vw, 80px);
    }

    .timeline-node {
        min-width: 140px;
    }
}
