/* ===================================================
   mechanic.monster -- Frutiger Aero Garage
   ===================================================
   Palette:
     Engine Burgundy:    #5c1a2a
     Brake Caliper Red:  #8b2d3a
     Shop Cream:         #f5f0e8
     Diagnostic White:   #fafbfd
     Aero Frost:         rgba(255, 255, 255, 0.22)
     Carbon Black:       #2a2a2e
     Patina Steel:       #7a8b8f
     Amber Drop Light:   #c8873a
     Frost Edge:         rgba(255, 255, 255, 0.38)

   Fonts:
     Display:  Barlow Condensed 700
     Body:     DM Sans 400/500
     Mono:     IBM Plex Mono 400
   =================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: #2a2a2e;
    background-color: #f5f0e8;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
}

/* ===================================================
   NAVIGATION PILL
   =================================================== */

.nav-pill {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: width 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                height 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                border-radius 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 110px;
    height: 44px;
}

.nav-pill.is-open {
    width: 280px;
    height: auto;
    border-radius: 20px;
}

.nav-pill-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    user-select: none;
}

.nav-wave-icon {
    flex-shrink: 0;
}

.nav-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5c1a2a;
}

.nav-links {
    list-style: none;
    padding: 0 20px 16px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.nav-pill.is-open .nav-links {
    display: flex;
}

.nav-links li {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 250ms ease, transform 250ms ease;
}

.nav-pill.is-open .nav-links li {
    opacity: 1;
    transform: translateX(0);
}

.nav-pill.is-open .nav-links li:nth-child(1) { transition-delay: 50ms; }
.nav-pill.is-open .nav-links li:nth-child(2) { transition-delay: 100ms; }
.nav-pill.is-open .nav-links li:nth-child(3) { transition-delay: 150ms; }
.nav-pill.is-open .nav-links li:nth-child(4) { transition-delay: 200ms; }
.nav-pill.is-open .nav-links li:nth-child(5) { transition-delay: 250ms; }
.nav-pill.is-open .nav-links li:nth-child(6) { transition-delay: 300ms; }
.nav-pill.is-open .nav-links li:nth-child(7) { transition-delay: 350ms; }

.nav-links a {
    display: block;
    padding: 8px 0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #5c1a2a;
    text-decoration: none;
    transition: color 200ms ease;
}

.nav-links a:hover {
    color: #8b2d3a;
}

/* ===================================================
   HERO SECTION
   =================================================== */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #2a2a2e;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Engine bay / workshop photograph placeholder using CSS gradient to simulate warm amber workshop lighting */
    background:
        linear-gradient(135deg,
            rgba(92, 26, 42, 0.15) 0%,
            rgba(42, 42, 46, 0.3) 40%,
            rgba(200, 135, 58, 0.2) 70%,
            rgba(42, 42, 46, 0.4) 100%),
        linear-gradient(220deg,
            #3a2a1e 0%,
            #1a1a1e 30%,
            #2a2520 50%,
            #4a3828 70%,
            #2a2a2e 100%);
    background-size: cover;
    opacity: 0;
    transition: opacity 200ms ease;
}

.hero-bg.loaded {
    opacity: 1;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-waveform-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 80%;
    z-index: 2;
    opacity: 0;
    animation: heroWaveReveal 600ms ease 400ms forwards, waveformDrift 30s linear 400ms infinite;
}

@keyframes heroWaveReveal {
    to { opacity: 1; }
}

@keyframes waveformDrift {
    from { transform: translate(-50%, -50%) translateX(-100px); }
    to { transform: translate(-50%, -50%) translateX(0px); }
}

.hero-glass-panel {
    position: absolute;
    bottom: 12vh;
    left: 8vw;
    width: max(420px, 40vw);
    max-width: calc(100vw - 16vw);
    padding: 3rem 2.5rem;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
    animation: glassPanelEnter 800ms cubic-bezier(0.16, 1, 0.3, 1) 600ms forwards;
}

@keyframes glassPanelEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    letter-spacing: -0.01em;
    color: #f5f0e8;
    line-height: 1.05;
    clip-path: inset(0 100% 0 0);
    animation: titleWipe 700ms ease 900ms forwards;
}

@keyframes titleWipe {
    to {
        clip-path: inset(0 0% 0 0);
    }
}

.hero-tagline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: rgba(245, 240, 232, 0.85);
    line-height: 1.72;
    margin-top: 1.2rem;
    max-width: 50ch;
    opacity: 0;
    transform: translateY(15px);
    animation: taglineFadeUp 500ms ease 1200ms forwards;
}

@keyframes taglineFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    animation: scrollPulse 2.4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
    transition: opacity 200ms ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ===================================================
   WAVE-FORM SECTION DIVIDERS
   =================================================== */

.wave-divider {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.wave-divider svg {
    width: 100%;
    height: 40px;
}

.wave-line-1 {
    transition: transform 2s ease;
}

.wave-line-2 {
    transition: transform 2s ease;
}

.wave-line-3 {
    transition: transform 2s ease;
}

/* ===================================================
   CONTENT SECTIONS
   =================================================== */

.content-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem max(3rem, 12vw);
    position: relative;
}

.content-section[data-bg="cream"] {
    background-color: #f5f0e8;
}

.content-section[data-bg="white"] {
    background-color: #fafbfd;
}

/* Reveal animation */
.reveal-section .section-content,
.reveal-section .section-image-container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-section.is-visible .section-content {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section.is-visible .section-image-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 300ms;
}

.reveal-section.is-visible .section-heading {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section.is-visible .section-body {
    opacity: 1;
    transform: translateY(0);
}

/* Section Headings */
.section-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #5c1a2a;
    margin-bottom: 1.8rem;
    position: relative;
    display: inline-block;
    cursor: default;
}

.heading-text {
    position: relative;
    display: inline-block;
}

.heading-wave {
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 10px;
    overflow: visible;
}

.heading-wave path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 400ms ease;
}

.section-heading:hover .heading-wave path {
    stroke-dashoffset: 0;
}

/* Section Body Text */
.section-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: #2a2a2e;
    max-width: 65ch;
    margin-bottom: 1.4rem;
}

.section-body:last-of-type {
    margin-bottom: 1.8rem;
}

/* Section Meta (IBM Plex Mono) */
.section-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    letter-spacing: 0.06em;
    color: #7a8b8f;
    display: block;
    margin-top: 0.5rem;
}

/* ===================================================
   IMAGE-DOMINANT SECTIONS
   =================================================== */

.image-dominant {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-image-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.section-image {
    width: 100%;
    height: 50vh;
    min-height: 320px;
    border-radius: 12px;
    /* Simulated warm workshop photography via gradients */
    background-size: cover;
    background-position: center;
    filter: blur(0px) saturate(1);
    transition: filter 800ms ease;
}

/* Photographic simulation backgrounds */
.craft-image {
    background:
        linear-gradient(135deg,
            rgba(92, 26, 42, 0.04) 0%,
            transparent 100%),
        linear-gradient(180deg,
            #3a2820 0%,
            #5a4030 25%,
            #c8873a 40%,
            #8a6a40 55%,
            #4a3828 70%,
            #2a2a2e 100%);
}

.diagnostics-image {
    background:
        linear-gradient(135deg,
            rgba(92, 26, 42, 0.04) 0%,
            transparent 100%),
        linear-gradient(160deg,
            #1a1a2e 0%,
            #2a2a3e 30%,
            #1e2830 50%,
            #0a1a20 70%,
            #2a2a2e 100%);
}

.contact-image {
    background:
        linear-gradient(135deg,
            rgba(92, 26, 42, 0.04) 0%,
            transparent 100%),
        linear-gradient(200deg,
            #4a3828 0%,
            #3a2820 30%,
            #c8873a 50%,
            #5a4030 70%,
            #2a2a2e 100%);
}

/* Glass caption over images */
.image-glass-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.4rem;
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.caption-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.82rem, 1.3vw, 0.95rem);
    color: #f5f0e8;
    line-height: 1.55;
}

/* ===================================================
   SKEUOMORPHIC MICRO-DETAILS
   =================================================== */

/* Glossy plastic bevel for interactive elements */
.nav-pill-inner {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-radius: 28px;
}

/* Rounded lit surface for icon containers */
.nav-wave-icon {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 8px;
    padding: 2px;
}

/* ===================================================
   FOOTER
   =================================================== */

.site-footer {
    text-align: center;
    padding: 4rem 2rem 3rem;
    background-color: #f5f0e8;
    position: relative;
}

.footer-wave {
    width: 100%;
    height: 30px;
    margin-bottom: 2rem;
}

.footer-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #5c1a2a;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.footer-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    color: #7a8b8f;
}

/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 768px) {
    .hero-glass-panel {
        left: 5vw;
        bottom: 8vh;
        width: calc(100vw - 10vw);
        padding: 2rem 1.6rem;
    }

    .content-section {
        padding: 4rem max(1.5rem, 6vw);
        min-height: auto;
    }

    .section-image {
        height: 40vh;
        min-height: 240px;
    }

    .nav-pill {
        top: 1rem;
        right: 1rem;
    }

    .nav-pill.is-open {
        width: calc(100vw - 2rem);
        max-width: 300px;
    }

    .image-glass-caption {
        left: 0.8rem;
        right: 0.8rem;
        bottom: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-glass-panel {
        padding: 1.5rem 1.2rem;
    }

    .hero-tagline {
        font-size: 0.9rem;
    }

    .section-body {
        font-size: 0.95rem;
    }
}

/* ===================================================
   WAVE DIVIDER BACKGROUND CONTEXTS
   =================================================== */

/* Cream background sections get cream bg divider */
.content-section[data-bg="cream"] + .wave-divider {
    background-color: #f5f0e8;
}

.content-section[data-bg="white"] + .wave-divider {
    background-color: #fafbfd;
}

/* First divider after hero */
.hero-section + .wave-divider {
    background-color: #f5f0e8;
}

/* Between alternating sections -- blend */
.wave-divider {
    background: linear-gradient(to bottom, #fafbfd, #f5f0e8);
}

/* Specific divider background matching */
.hero-section ~ .wave-divider:nth-of-type(1) {
    background-color: #f5f0e8;
}
