/* ==========================================================================
   mechanic.monster — Frutiger Aero underwater mechanic shop
   Monochrome, diagonal-sections, path-draw blueprints, water bubbles
   ========================================================================== */

:root {
    --clean-white: #F5F5F5;
    --soft-gray: #D8D8D8;
    --paper-gray: #E8E8E8;
    --mid-gray: #A0A0A0;
    --dark-gray: #4A4A4A;
    --near-black: #2A2A2A;
    --bubble-highlight: #FFFFFF;
    --blueprint-line: #808080;
    --section-light: #F0F0F0;
    --section-dark: #E8E8E8;

    --font-display: 'Albert Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --skew-angle: -3deg;
    --counter-skew: 3deg;
    --max-w: 1280px;

    --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-water: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--dark-gray);
    background: linear-gradient(180deg, var(--clean-white) 0%, var(--soft-gray) 100%);
    background-attachment: fixed;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ==========================================================================
   Bubble atmosphere (fixed background layer)
   ========================================================================== */
.bubble-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.4) 25%,
            rgba(240, 240, 240, 0.15) 60%,
            rgba(200, 200, 200, 0.08) 100%);
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.5),
        inset -2px -4px 6px rgba(180, 180, 180, 0.15);
    will-change: transform, opacity;
    animation-name: bubble-rise;
    animation-timing-function: var(--ease-water);
    animation-iteration-count: infinite;
    opacity: 0;
}

@keyframes bubble-rise {
    0% {
        transform: translate3d(0, 110vh, 0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translate3d(20px, 50vh, 0) scale(1);
        opacity: 0.85;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate3d(-10px, -20vh, 0) scale(1.05);
        opacity: 0;
    }
}

/* ==========================================================================
   Floating mechanical parts
   ========================================================================== */
.floating-parts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.floating-part {
    position: absolute;
    color: var(--mid-gray);
    opacity: 0.5;
    will-change: transform;
    animation: float-drift 7s var(--ease-soft) infinite alternate;
}

@keyframes float-drift {
    0% {
        transform: translate3d(0, -10px, 0) rotate(-8deg);
    }
    100% {
        transform: translate3d(8px, 12px, 0) rotate(10deg);
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
    z-index: 5;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.6) 0%, transparent 60%),
        linear-gradient(180deg, var(--clean-white) 0%, var(--paper-gray) 70%, var(--soft-gray) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-w);
    width: 100%;
    text-align: center;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fade-up 1s var(--ease-soft) 0.4s forwards;
}

.meta-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--mid-gray);
    letter-spacing: 0.05em;
}

.logotype {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(40px, 8vw, 96px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--near-black);
    margin-bottom: 24px;
    opacity: 0;
    animation: fade-up 1.2s var(--ease-soft) 1s forwards;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8),
        0 -1px 1px rgba(160, 160, 160, 0.1);
}

.logo-part {
    background: linear-gradient(180deg, var(--near-black) 0%, var(--dark-gray) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.logo-dot {
    color: var(--mid-gray);
    margin: 0 0.05em;
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--dark-gray);
    max-width: 540px;
    margin: 0 auto 56px;
    opacity: 0;
    animation: fade-up 1s var(--ease-soft) 1.4s forwards;
}

.hero-creature {
    max-width: 720px;
    margin: 0 auto 48px;
    padding: 0 16px;
    opacity: 0;
    animation: fade-in 1s var(--ease-soft) 0.5s forwards;
}

.creature-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(160, 160, 160, 0.15));
}

.hero-scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mid-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in 1s var(--ease-soft) 2s forwards;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--mid-gray) 0%, transparent 100%);
    animation: scroll-pulse 2.4s var(--ease-water) infinite;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Path-draw mechanism
   ========================================================================== */
.path-draw {
    stroke-dasharray: var(--draw-length, 1000);
    stroke-dashoffset: var(--draw-length, 1000);
    transition: stroke-dashoffset 2.4s var(--ease-water);
}

.path-draw.is-drawn {
    stroke-dashoffset: 0;
}

/* ==========================================================================
   Diagonal sections
   ========================================================================== */
.diagonal-section {
    position: relative;
    margin: 60px -3% 60px;
    padding: 120px calc(3% + 24px);
    transform: skewY(var(--skew-angle));
    z-index: 4;
    overflow: hidden;
}

.diagonal-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.05) 30%,
        transparent 60%);
    pointer-events: none;
}

.section-light {
    background: var(--section-light);
}

.section-dark {
    background: var(--section-dark);
}

.diagonal-inner {
    transform: skewY(var(--counter-skew));
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    margin-bottom: 64px;
    text-align: left;
    max-width: 640px;
}

.section-index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--mid-gray);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--near-black);
    margin-bottom: 18px;
}

.section-deck {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.1vw, 17px);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ==========================================================================
   Services grid
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.service-card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%),
        var(--clean-white);
    border: 1px solid rgba(160, 160, 160, 0.25);
    border-radius: 16px;
    padding: 32px 28px 28px;
    transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 8px 20px -12px rgba(120, 120, 120, 0.18);
    overflow: hidden;
}

.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 16px 32px -16px rgba(120, 120, 120, 0.28);
}

.card-blueprint {
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
}

.blueprint-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.service-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    color: var(--near-black);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-desc {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-spec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px dashed rgba(160, 160, 160, 0.4);
}

.spec-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mid-gray);
    letter-spacing: 0.05em;
}

.spec-value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--near-black);
    font-weight: 500;
}

/* ==========================================================================
   Schematic
   ========================================================================== */
.schematic-frame {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.05) 40%, transparent 100%),
        var(--paper-gray);
    border: 1px solid rgba(160, 160, 160, 0.3);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

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

.indicator {
    transition: fill 0.5s var(--ease-soft);
}

.indicator.is-lit {
    fill: var(--mid-gray);
}

.legend-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.legend-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--dark-gray);
}

.legend-num {
    font-family: var(--font-mono);
    font-size: 12px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--mid-gray);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--near-black);
    flex-shrink: 0;
    background: var(--clean-white);
}

/* ==========================================================================
   Workshop log
   ========================================================================== */
.log-list {
    list-style: none;
    border-left: 1px dashed var(--mid-gray);
    padding-left: 28px;
    margin-left: 8px;
}

.log-entry {
    position: relative;
    padding: 18px 0;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 28px;
    align-items: start;
}

.log-entry::before {
    content: "";
    position: absolute;
    left: -33px;
    top: 28px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--clean-white);
    border: 1.5px solid var(--blueprint-line);
}

.log-entry + .log-entry {
    border-top: 1px dashed rgba(160, 160, 160, 0.3);
}

.log-time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--near-black);
    font-weight: 500;
}

.log-body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.7;
}

/* ==========================================================================
   Appointment form
   ========================================================================== */
.appointment-form {
    max-width: 720px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%),
        var(--clean-white);
    border: 1px solid rgba(160, 160, 160, 0.3);
    border-radius: 18px;
    padding: 36px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 12px 24px -16px rgba(120, 120, 120, 0.22);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-row .form-field {
    margin-bottom: 0;
}

.field-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mid-gray);
    letter-spacing: 0.05em;
}

.form-field input,
.form-field select,
.form-field textarea {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--near-black);
    padding: 12px 14px;
    background: var(--clean-white);
    border: 1px solid rgba(160, 160, 160, 0.4);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
    width: 100%;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--mid-gray);
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: var(--mid-gray);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--dark-gray);
    background: #FAFAFA;
    box-shadow: 0 0 0 3px rgba(160, 160, 160, 0.12);
}

.submit-btn {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--clean-white);
    padding: 14px 28px;
    background: linear-gradient(180deg, var(--dark-gray) 0%, var(--near-black) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 16px -10px rgba(40, 40, 40, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        0 12px 22px -12px rgba(40, 40, 40, 0.5);
}

.btn-arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease-soft);
}

.submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.form-status {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--dark-gray);
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.4s var(--ease-soft);
}

.form-status.is-visible {
    opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    position: relative;
    z-index: 5;
    padding: 48px 24px;
    background: var(--paper-gray);
    border-top: 1px solid rgba(160, 160, 160, 0.25);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--mid-gray);
}

.footer-mark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--near-black);
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
    .diagonal-section {
        margin: 40px -4% 40px;
        padding: 80px calc(4% + 16px);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .log-entry {
        grid-template-columns: 70px 1fr;
        gap: 16px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bubble {
        display: none;
    }
}
