/* =============================================
   mechanic.party — v2 (calibration log)
   Chrome metallic + Art Deco precision + Zen pulse
   ============================================= */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #404058;
    background:
        radial-gradient(ellipse at top left, #F0ECE8 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, #DDD8D0 0%, transparent 60%),
        linear-gradient(135deg, #E0E0E8 0%, #D0D0D8 50%, #E0E0E8 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* --- Typography Primitives --- */
.logotype {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #404058;
}

.tech-label {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #606070;
}

.section-heading {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    color: #404058;
    font-size: clamp(28px, 4vw, 56px);
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.card-heading {
    font-family: 'Poiret One', cursive;
    font-weight: 400;
    color: #404058;
    font-size: clamp(20px, 2.2vw, 28px);
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin: 0.4rem 0 0.6rem;
}

.body-text {
    font-family: 'Noto Sans', sans-serif;
    color: #404058;
    line-height: 1.75;
    font-size: clamp(14px, 1vw, 17px);
}

/* --- Wave Path Common --- */
.wave-path {
    fill: none;
    stroke: #B0B0C0;
    stroke-width: 1.5px;
    stroke-linecap: round;
}

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

/* --- Ambient Wave Layer (drifts behind everything) --- */
.ambient-waves {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.ambient-svg {
    position: absolute;
    left: -10%;
    width: 130%;
    height: 220px;
    animation: waveShift 14s linear infinite;
}

.ambient-svg-1 { top: 14%;  opacity: 0.55; animation-duration: 16s; }
.ambient-svg-2 { top: 46%;  opacity: 0.40; animation-duration: 22s; animation-direction: reverse; }
.ambient-svg-3 { top: 78%;  opacity: 0.50; animation-duration: 18s; }

.ambient-svg .wave-path {
    stroke: #B0B0C0;
    stroke-width: 1.2px;
}

@keyframes waveShift {
    from { transform: translateX(0); }
    to   { transform: translateX(-200px); }
}

/* --- Top Chrome Rail --- */
.chrome-rail {
    position: relative;
    z-index: 5;
    width: 100%;
    background: linear-gradient(135deg, #E0E0E8 0%, #D0D0D8 50%, #E0E0E8 100%);
    border-bottom: 1px solid rgba(96, 96, 112, 0.18);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 6px rgba(0, 0, 0, 0.04);
}

.rail-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px clamp(20px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transform: skewY(-1deg);
    transform-origin: left center;
}

.rail-mark { white-space: nowrap; }
.rail-mark-mid { color: #404058; }

@media (max-width: 720px) {
    .rail-inner { transform: none; flex-wrap: wrap; gap: 0.5rem 1rem; }
    .rail-mark-mid { display: none; }
}

/* --- Hero: Chrome Meditation Chamber --- */
.hero-chamber {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 48px);
    padding: clamp(48px, 8vh, 96px) clamp(20px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chamber-frame {
    position: relative;
    width: 100%;
    max-width: 1100px;
    padding: clamp(40px, 8vh, 88px) clamp(24px, 6vw, 80px);
    background:
        linear-gradient(135deg, rgba(240, 236, 232, 0.85) 0%, rgba(232, 224, 216, 0.85) 25%, rgba(240, 236, 232, 0.85) 50%, rgba(221, 216, 208, 0.85) 75%, rgba(240, 236, 232, 0.85) 100%);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(96, 96, 112, 0.12);
    border: 1px solid rgba(96, 96, 112, 0.22);
}

.frame-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1.5px solid #606070;
}
.frame-corner-tl { top: -1px; left: -1px;  border-right: none; border-bottom: none; }
.frame-corner-tr { top: -1px; right: -1px; border-left: none;  border-bottom: none; }
.frame-corner-bl { bottom: -1px; left: -1px;  border-right: none; border-top: none; }
.frame-corner-br { bottom: -1px; right: -1px; border-left: none;  border-top: none; }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-block;
    margin-bottom: 1.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(96, 96, 112, 0.25);
}

#logotype {
    font-size: clamp(40px, 7vw, 88px);
    line-height: 1.05;
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeRise 1.4s ease-out 0.8s forwards;
}

.hero-tagline {
    font-family: 'Noto Sans', sans-serif;
    color: #606070;
    font-style: italic;
    font-size: clamp(15px, 1.3vw, 19px);
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeRise 1.2s ease-out 1.4s forwards;
}

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

.hero-pulse-row {
    display: flex;
    gap: 1.4rem;
    justify-content: center;
    margin-top: 2.4rem;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E0E0E8, #B0B0C0);
    box-shadow: 0 0 0 0 rgba(192, 192, 208, 0.4);
}

.hero-pulse-row .pulse-dot[data-pulse="2"] { animation-delay: 1s; }
.hero-pulse-row .pulse-dot[data-pulse="3"] { animation-delay: 2s; }

/* --- Pulse Marker (shared) --- */
.pulse-marker {
    animation: pulseChrome 3s ease-in-out infinite;
}

@keyframes pulseChrome {
    0%   { box-shadow: 0 0 0 0   rgba(192, 192, 208, 0.4); }
    50%  { box-shadow: 0 0 0 12px rgba(192, 192, 208, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(192, 192, 208, 0);   }
}

.hero-wave-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    overflow: hidden;
    opacity: 0.7;
}

.hero-wave-svg {
    width: 100%;
    height: 100%;
    animation: waveShift 12s linear infinite;
}

.hero-wave-1 { stroke: #B0B0C0; }
.hero-wave-2 { stroke: rgba(200, 176, 128, 0.7); stroke-width: 1.2px; }

/* --- Scroll cue --- */
.scroll-cue {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 1px solid rgba(96, 96, 112, 0.4);
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: #606070;
    border-radius: 999px;
    backdrop-filter: blur(2px);
    background: rgba(240, 236, 232, 0.6);
    transition: border-color 0.4s ease, transform 0.4s ease;
}

.scroll-cue:hover {
    border-color: #C8B080;
    transform: translateX(-50%) translateY(2px);
}

/* --- Calibration Log --- */
.calibration-log {
    position: relative;
    z-index: 1;
    padding: clamp(80px, 12vh, 160px) clamp(20px, 6vw, 96px);
    max-width: 1180px;
    margin: 0 auto;
}

.log-heading-block {
    max-width: 720px;
    margin-bottom: clamp(2.2rem, 5vh, 4rem);
}

.log-eyebrow {
    display: inline-block;
    margin-bottom: 0.9rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(96, 96, 112, 0.25);
}

.section-lede {
    color: #606070;
    margin-top: 1rem;
    max-width: 560px;
}

.log-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(1.2rem, 3vh, 2.2rem);
    counter-reset: entry;
}

.log-entry {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1.2rem;
    align-items: stretch;
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.log-entry.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.log-rail {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

.rail-tick {
    width: 14px;
    height: 14px;
    border: 1.5px solid #606070;
    background: linear-gradient(135deg, #E0E0E8, #B0B0C0);
    transform: rotate(45deg);
    box-shadow: 0 0 0 0 rgba(192, 192, 208, 0.4);
    animation: pulseChrome 4s ease-in-out infinite;
}

.rail-line {
    flex: 1;
    width: 1px;
    margin-top: 8px;
    background: linear-gradient(to bottom, rgba(96, 96, 112, 0.5), rgba(96, 96, 112, 0.05));
}

.log-entry:last-child .rail-line { display: none; }

.log-card {
    padding: clamp(1.4rem, 3vw, 2.2rem);
    transform: skewY(-1.4deg);
    transform-origin: left center;
}

.log-card > * {
    transform: skewY(1.4deg);
}

.log-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px dashed rgba(96, 96, 112, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 0.6rem;
}

.log-stamp { color: #606070; }

/* Marble panel (shared) */
.marble-panel {
    background: linear-gradient(135deg, #F0ECE8 0%, #E8E0D8 25%, #F0ECE8 50%, #DDD8D0 75%, #F0ECE8 100%);
    border: 1px solid rgba(96, 96, 112, 0.2);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
}

@media (max-width: 720px) {
    .log-entry { grid-template-columns: 32px 1fr; gap: 0.8rem; }
    .log-card { transform: none; }
    .log-card > * { transform: none; }
}

/* --- Gauge Cluster (Diagonal Bench) --- */
.gauge-cluster {
    position: relative;
    z-index: 1;
    margin-top: clamp(2rem, 6vh, 5rem);
    padding: clamp(80px, 14vh, 180px) 0;
    background:
        linear-gradient(135deg, rgba(224, 224, 232, 0.92) 0%, rgba(208, 208, 216, 0.92) 50%, rgba(224, 224, 232, 0.92) 100%);
    transform: skewY(-2deg);
    transform-origin: center;
    border-top: 1px solid rgba(96, 96, 112, 0.18);
    border-bottom: 1px solid rgba(96, 96, 112, 0.18);
}

.cluster-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 6vw, 96px);
    transform: skewY(2deg);
}

.cluster-heading-block {
    margin-bottom: clamp(2rem, 5vh, 3.4rem);
    max-width: 720px;
}

.cluster-heading-block .tech-label {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(96, 96, 112, 0.25);
}

.gauge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
}

.gauge {
    position: relative;
    background: linear-gradient(135deg, #F0ECE8 0%, #E8E0D8 25%, #F0ECE8 50%, #DDD8D0 75%, #F0ECE8 100%);
    border: 1px solid rgba(96, 96, 112, 0.22);
    padding: 1.4rem 1.2rem 1.2rem;
    text-align: center;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: border-color 0.5s ease, transform 0.5s ease;
}

.gauge:hover {
    border-color: #C8B080;
    transform: translateY(-2px);
}

.gauge-label {
    display: block;
    margin-bottom: 0.6rem;
}

.gauge-dial {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dial-track {
    fill: none;
    stroke: rgba(96, 96, 112, 0.15);
    stroke-width: 6;
}

.dial-fill {
    fill: none;
    stroke: #B0B0C0;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 301.6;
    stroke-dashoffset: 301.6;
    transition: stroke-dashoffset 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gauge.is-visible .dial-fill {
    /* stroke-dashoffset set inline via JS to ensure proper trigger */
}

.dial-needle {
    stroke: #404058;
    stroke-width: 1.4;
    stroke-linecap: round;
    transform-origin: 60px 60px;
    transform: rotate(-90deg);
    transition: transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.dial-cap {
    fill: #C8B080;
    stroke: #606070;
    stroke-width: 1;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Poiret One', cursive;
    color: #404058;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
}

.gauge-unit {
    display: block;
    margin-top: 0.6rem;
    color: #606070;
}

.cluster-wave {
    margin-top: clamp(2rem, 5vh, 3.5rem);
    height: 70px;
    overflow: hidden;
    opacity: 0.7;
}

.cluster-wave svg {
    width: 100%;
    height: 100%;
    animation: waveShift 18s linear infinite;
}

.cluster-wave-path { stroke: rgba(200, 176, 128, 0.55); stroke-width: 1.2px; }

/* --- Manifesto --- */
.manifesto-section {
    position: relative;
    z-index: 1;
    padding: clamp(80px, 12vh, 160px) clamp(20px, 6vw, 80px);
    display: flex;
    justify-content: center;
}

.manifesto-frame {
    width: 100%;
    max-width: 920px;
    transform: skewY(1.5deg);
}

.manifesto-panel {
    padding: clamp(2rem, 5vw, 4rem);
    transform: skewY(-1.5deg);
    text-align: center;
}

.manifesto-eyebrow {
    display: inline-block;
    margin-bottom: 1.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(96, 96, 112, 0.25);
}

.manifesto-body {
    font-family: 'Poiret One', cursive;
    color: #404058;
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1.55;
    letter-spacing: 0.025em;
    max-width: 760px;
    margin: 0 auto;
}

.manifesto-mark {
    color: #C8B080;
    font-size: 1.3em;
    line-height: 0;
    vertical-align: -0.15em;
    margin-right: 0.1em;
}

.manifesto-mark-end { margin-left: 0.1em; margin-right: 0; }

.manifesto-sign {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.manifesto-sign .tech-label { color: #606070; }

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 1;
    padding: clamp(60px, 8vh, 100px) clamp(20px, 6vw, 80px) 40px;
    background: linear-gradient(135deg, #DDD8D0 0%, #E0E0E8 50%, #DDD8D0 100%);
    border-top: 1px solid rgba(96, 96, 112, 0.18);
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    overflow: hidden;
    opacity: 0.7;
    pointer-events: none;
}

.footer-wave svg {
    width: 100%;
    height: 100%;
    animation: waveShift 16s linear infinite;
}

.footer-wave-path { stroke: #B0B0C0; stroke-width: 1.4px; }

.footer-grid {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.6rem;
    flex-wrap: wrap;
    padding-top: 60px;
}

.footer-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-block-right {
    align-items: flex-end;
    text-align: right;
}

.footer-logotype {
    font-size: clamp(22px, 2.6vw, 32px);
}

.footer-sub {
    color: #606070;
    font-style: italic;
    font-family: 'Noto Sans', sans-serif;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 13px;
}

@media (max-width: 720px) {
    .footer-grid { flex-direction: column; align-items: flex-start; }
    .footer-block-right { align-items: flex-start; text-align: left; }
}

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