/* ============================================================
   completengine.net - Styles
   Neomorphic Workshop Aesthetic
   ============================================================ */

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

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

body {
    background: #F5EDE0;
    color: #5C4B3A;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    color: #3B2F1E;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: #5C4B3A;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: #B8860B;
    text-decoration: none;
    background-image: linear-gradient(#B8860B, #B8860B);
    background-position: center bottom;
    background-size: 0% 1px;
    background-repeat: no-repeat;
    transition: background-size 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover {
    background-size: 100% 1px;
}

a:visited {
    color: #5B7B7A;
}

/* --- Card Label (DM Mono accent) --- */
.card-label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9E8D7A;
    margin-bottom: 1rem;
}

/* --- Navigation Pill --- */
.nav-pill {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5C4B3A;
    background: #F5EDE0;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 6px 6px 12px #C4B39A, -6px -6px 12px #FFF8F0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-image: none;
}

.nav-pill:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 16px #C4B39A, -8px -8px 16px #FFF8F0;
    background-image: none;
    background-size: 0;
    color: #3B2F1E;
}

.nav-pill:visited {
    color: #5C4B3A;
}

/* --- Grid Container --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 64px;
}

/* --- Zones --- */
.zone {
    padding: 96px 0;
    position: relative;
}

.zone:first-of-type {
    padding-top: 120px;
}

/* --- Zone Headers --- */
.zone-header {
    grid-column: span 12;
    text-align: center;
    margin-bottom: 16px;
}

/* --- Neomorphic Card System --- */
.neo-card {
    background: #F5EDE0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 8px 8px 16px #C4B39A, -8px -8px 16px #FFF8F0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neo-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 24px #C4B39A, -12px -12px 24px #FFF8F0;
}

.neo-card:active {
    transform: translateY(1px);
    box-shadow: inset 4px 4px 8px #C4B39A, inset -4px -4px 8px #FFF8F0;
}

/* --- Zone 1: The Workshop (Hero) --- */
.hero-card {
    grid-column: 2 / 12;
    text-align: center;
    padding: 48px;
}

.hero-image-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-photo {
    width: 100%;
    height: 100%;
}

.hero-tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    color: #9E8D7A;
    max-width: 560px;
    margin: 0 auto;
}

.theme-card {
    grid-column: span 4;
}

/* --- Archive Photo Treatment --- */
.archive-photo {
    filter: sepia(0.6) contrast(1.1) brightness(0.95) saturate(0.7);
    border-radius: 16px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.hero-photo {
    background: linear-gradient(135deg, #C4B39A 0%, #9E8D7A 40%, #B8860B 70%, #5C4B3A 100%);
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.08) translate(-2%, -1%);
    }
}

/* --- Card Accents --- */
.card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #B8860B;
    margin-bottom: 1rem;
}

.hairline-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #C4B39A;
    margin-top: 1.5rem;
}

.hairline-rule {
    height: 1px;
    background: linear-gradient(to right, transparent, #C4B39A, transparent);
    margin: 1.5rem 0;
}

/* --- Calibration Cross --- */
.calibration-cross {
    position: relative;
    width: 24px;
    height: 24px;
    margin: 48px auto 0;
}

.calibration-cross::before,
.calibration-cross::after {
    content: '';
    position: absolute;
    background: #C4B39A;
    opacity: 0.5;
}

.calibration-cross::before {
    width: 1px;
    height: 24px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.calibration-cross::after {
    width: 24px;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* --- Zone 2: Components --- */
.component-card {
    grid-column: span 4;
}

/* --- Zone 3: Assembly --- */
.assembly-image-card {
    grid-column: span 6;
    padding: 0;
    overflow: hidden;
    min-height: 320px;
}

.assembly-text-card {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.assembly-photo-1 {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border-radius: 20px;
    background: linear-gradient(160deg, #9E8D7A 0%, #C4B39A 30%, #B8860B 60%, #5C4B3A 90%);
}

.assembly-photo-2 {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border-radius: 20px;
    background: linear-gradient(200deg, #5C4B3A 0%, #B8860B 35%, #C4B39A 65%, #9E8D7A 100%);
}

/* --- Zone 4: Calibration --- */
.carousel-container {
    grid-column: span 12;
    padding: 32px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
    height: 4px;
}

.carousel-track::-webkit-scrollbar-track {
    background: #F5EDE0;
    border-radius: 2px;
}

.carousel-track::-webkit-scrollbar-thumb {
    background: #C4B39A;
    border-radius: 2px;
}

.carousel-card {
    flex: 0 0 280px;
    min-width: 280px;
    scroll-snap-align: start;
    padding: 28px;
}

.carousel-card h3 {
    color: #3B2F1E;
}

/* --- Zone 5: Ignition --- */
.ignition-card {
    grid-column: 3 / 11;
    text-align: center;
    padding: 56px 48px;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ignition-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 24px #C4B39A, -12px -12px 24px #FFF8F0;
}

.ignition-card:active {
    transform: translateY(1px);
    box-shadow: inset 4px 4px 8px #C4B39A, inset -4px -4px 8px #FFF8F0;
}

.contact-link {
    display: inline-block;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #B8860B;
    background-color: #F5EDE0;
    padding: 14px 36px;
    border-radius: 50px;
    box-shadow: 6px 6px 12px #C4B39A, -6px -6px 12px #FFF8F0;
    margin: 1.5rem 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-image: none;
}

.contact-link:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 16px #C4B39A, -8px -8px 16px #FFF8F0;
    background-image: none;
    background-size: 0;
}

.contact-link:active {
    transform: translateY(1px);
    box-shadow: inset 3px 3px 6px #C4B39A, inset -3px -3px 6px #FFF8F0;
}

.contact-link:visited {
    color: #B8860B;
}

.ignition-rule {
    margin-top: 2rem;
}

.ignition-footer {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9E8D7A;
    margin-top: 1rem;
}

/* --- Fade-In Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive (< 768px) --- */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 24px;
    }

    .hero-card {
        grid-column: span 1;
        padding: 32px 24px;
    }

    .theme-card {
        grid-column: span 1;
    }

    .component-card {
        grid-column: span 1;
    }

    .assembly-image-card,
    .assembly-text-card {
        grid-column: span 1;
    }

    .carousel-container {
        grid-column: span 1;
        padding: 24px 16px;
    }

    .ignition-card {
        grid-column: span 1;
        padding: 40px 24px;
    }

    .zone-header {
        grid-column: span 1;
    }

    .zone {
        padding: 64px 0;
    }

    .zone:first-of-type {
        padding-top: 80px;
    }

    .hero-image-wrapper {
        height: 200px;
    }

    .nav-pill {
        top: 16px;
        right: 16px;
        font-size: 0.65rem;
        padding: 8px 14px;
    }
}
