/* concengine.com - Luxury Mechanical Observatory */
/* Colors: #2C1810 Dark Walnut, #1A0E08 Ebony Chamber, #F4EDE4 Parchment,
   #E8DED0 Aged Linen, #B8976A Oxidized Brass, #8B6914 Deep Gold,
   #6B4423 Chestnut, #9B3D2B Burnt Sienna */

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

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

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    color: #E8DED0;
    background-color: #2C1810;
    overflow-x: hidden;
    position: relative;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ================================
   SKELETON LOADING SYSTEM
   ================================ */
.skeleton-wrap {
    display: inline-block;
    position: relative;
}

.skeleton-target .skeleton-content {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.skeleton-target.revealed .skeleton-content {
    opacity: 1;
}

.skeleton-target .skeleton-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(107, 68, 35, 0.15) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 2px;
}

.skeleton-target.revealed .skeleton-wrap::before {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes stamp {
    0% { transform: scale(1.02); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.skeleton-target.revealed {
    animation: stamp 0.2s ease-out forwards;
}

/* ================================
   PATINA TEXTURE OVERLAY
   ================================ */
.section--dark::before,
.section--darkest::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    filter: url(#patina-noise);
    pointer-events: none;
    z-index: 0;
}

/* ================================
   NAVIGATION DIAMOND
   ================================ */
#nav-diamond {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
}

.diamond-shape {
    width: 32px;
    height: 32px;
    background: #B8976A;
    transform: rotate(45deg);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.diamond-shape:hover {
    background: #8B6914;
}

#nav-diamond:hover .diamond-shape {
    transform: rotate(45deg) scale(0.8);
}

#nav-index {
    position: absolute;
    top: 44px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 12px 0;
}

#nav-diamond:hover #nav-index {
    opacity: 1;
    pointer-events: auto;
}

.nav-link {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #B8976A;
    text-decoration: none;
    white-space: nowrap;
    text-align: right;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #8B6914;
}

/* ================================
   SECTIONS
   ================================ */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section--dark {
    background-color: #2C1810;
    color: #E8DED0;
}

.section--darkest {
    background-color: #1A0E08;
    color: #E8DED0;
}

.section--light {
    background-color: #F4EDE4;
    color: #2C1810;
}

.section-divider {
    width: 100%;
    height: 3px;
    background-color: #B8976A;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* ================================
   SECTION I: THE DIAL FACE
   ================================ */
.dial-face__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.gear-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 60px;
}

.gear-diagram {
    width: 100%;
    height: auto;
}

.gear__body,
.gear__inner,
.gear__hub {
    fill: none;
    stroke: #B8976A;
    stroke-width: 1;
}

.gear__body { opacity: 0.5; }
.gear__inner { opacity: 0.3; }
.gear__hub { opacity: 0.7; fill: #B8976A; fill-opacity: 0.2; }

.gear--a {
    transform-origin: 220px 200px;
    animation: rotateClockwise 120s linear infinite;
}

.gear--b {
    transform-origin: 380px 200px;
    animation: rotateCounterClockwise 180s linear infinite;
}

@keyframes rotateClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.dial-face__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(42px, 5.5vw, 88px);
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #E8DED0;
    text-align: center;
}

/* ================================
   SECTION II: THE ESCAPEMENT
   ================================ */
.escapement__layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.escapement__text-column {
    width: 60%;
    padding: 120px 60px 120px 15%;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #B8976A;
    margin-bottom: 40px;
    display: block;
}

.section--light .section-label {
    color: #6B4423;
}

.section-label--centered {
    text-align: center;
    width: 100%;
    padding-top: 80px;
}

.typewriter-block {
    position: relative;
    max-width: 640px;
}

.typewriter-content {
    display: inline;
}

#typewriter-output {
    display: inline;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #B8976A;
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 0.5s step-end infinite;
    opacity: 0;
}

.typewriter-cursor.active {
    opacity: 1;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.section--light .typewriter-cursor {
    background: #6B4423;
}

.escapement__timeline-axis {
    width: 40%;
    position: relative;
}

.timeline-line {
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 40px;
    width: 1px;
    background: #6B4423;
    opacity: 0.4;
}

.timeline-diamond {
    position: absolute;
    left: 34px;
    width: 12px;
    height: 12px;
    background: #B8976A;
    transform: rotate(45deg);
    opacity: 0.6;
}

/* ================================
   SECTION III: THE COMPLICATIONS
   ================================ */
.complications__layout {
    min-height: 100vh;
    padding: 0 40px 120px;
    position: relative;
    z-index: 1;
}

.complications__timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 40px 0;
}

.complications__axis {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
}

.complications__axis-line {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.axis-draw-line {
    stroke: #B8976A;
    stroke-width: 1;
    opacity: 0.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.1s linear;
}

.complication-node {
    display: flex;
    align-items: flex-start;
    margin-bottom: 80px;
    position: relative;
}

.complication-node--left {
    flex-direction: row-reverse;
    padding-right: 52%;
}

.complication-node--right {
    padding-left: 52%;
}

.complication-node__connector {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
}

.complication-node__diamond {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complication-node__diamond::before {
    content: '';
    width: 16px;
    height: 16px;
    background: #B8976A;
    transform: rotate(45deg);
    transition: transform 0.3s ease, background 0.3s ease;
}

.complication-node:hover .complication-node__diamond::before {
    background: #8B6914;
    transform: rotate(45deg) scale(1.2);
}

.complication-node__content {
    max-width: 480px;
}

.complication-node__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #B8976A;
    margin-bottom: 16px;
    line-height: 1.3;
}

.complication-node__text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 16px;
    line-height: 1.75;
    color: #E8DED0;
    opacity: 0.85;
}

/* ================================
   SECTION IV: THE MOVEMENT
   ================================ */
.movement__content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.movement__diagram {
    width: 100%;
    max-width: 900px;
    height: 500px;
    margin: 40px auto 0;
    position: relative;
}

#movement-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ================================
   SECTION V: THE REGISTRY
   ================================ */
.registry__content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.registry__nameplate {
    text-align: center;
}

.nameplate__border {
    border: 2px solid #B8976A;
    padding: 4px;
    display: inline-block;
}

.nameplate__inner {
    border: 1px solid #B8976A;
    padding: 60px 80px;
}

.nameplate__maker {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B8976A;
    margin-bottom: 8px;
}

.nameplate__type {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: #E8DED0;
    opacity: 0.7;
    margin-bottom: 24px;
}

.nameplate__divider {
    width: 60px;
    height: 1px;
    background: #6B4423;
    margin: 24px auto;
}

.nameplate__detail {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 14px;
    font-style: italic;
    color: #E8DED0;
    opacity: 0.8;
    margin-bottom: 8px;
}

.nameplate__version {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #6B4423;
    margin-bottom: 0;
}

.nameplate__contact {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #B8976A;
    margin-top: 0;
}

/* ================================
   LEFT GUTTER TICK MARKS
   ================================ */
#gutter-ticks {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.gutter-tick {
    position: absolute;
    left: 0;
    height: 1px;
    background: #6B4423;
    opacity: 0.4;
}

.gutter-tick--major {
    width: 32px;
    opacity: 0.6;
}

.gutter-tick--minor {
    width: 20px;
}

.gutter-tick__label {
    position: absolute;
    left: 36px;
    top: -6px;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    color: #6B4423;
    letter-spacing: 0.04em;
    opacity: 0.5;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .escapement__layout {
        flex-direction: column;
    }
    .escapement__text-column {
        width: 100%;
        padding: 80px 24px;
    }
    .escapement__timeline-axis {
        display: none;
    }
    .complication-node--left,
    .complication-node--right {
        padding-left: 60%;
        padding-right: 0;
        flex-direction: row;
    }
    .complication-node--left {
        padding-left: 0;
        padding-right: 60%;
    }
    .nameplate__inner {
        padding: 40px 30px;
    }
    #gutter-ticks {
        display: none;
    }
}
