/* ======================================
   opensource.day - Styles
   Neomorphic Commemorative Design
   ====================================== */

/* Palette
   Parchment base:    #E8E0D0
   Shadow warm:       #C8B8A0
   Highlight cream:   #F8F0E8
   Marble charcoal:   #3A3830
   Classical gold:    #B89840
   Vintage rose:      #C08070
   Sage muted:        #808870
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: #3A3830;
    background-color: #E8E0D0;
    overflow-x: hidden;
}

/* ======================================
   Commemorative Seal (Hero)
   ====================================== */

#commemorative-seal {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #E8E0D0;
    overflow: hidden;
}

.seal-ornament {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(70vw, 420px);
    height: min(70vw, 420px);
    z-index: 1;
}

.laurel-wreath {
    width: 100%;
    height: 100%;
}

.laurel-wreath path,
.laurel-wreath line,
.laurel-wreath polyline,
.laurel-wreath ellipse {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawStroke 1200ms ease-out forwards;
}

@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

.seal-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
}

.seal-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #808870;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeIn 800ms 600ms ease-out forwards;
}

.domain-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(36px, 5vw, 72px);
    letter-spacing: 0.02em;
    color: #3A3830;
    transform: scale(0.8);
    opacity: 0;
    animation: sealReveal 800ms 400ms ease-out forwards;
    text-shadow: none;
    transition: box-shadow 600ms ease;
}

@keyframes sealReveal {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.domain-title-shadow {
    box-shadow: 6px 6px 12px #C8B8A0, -6px -6px 12px #F8F0E8;
}

.seal-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 18px);
    color: #808870;
    margin-top: 12px;
    opacity: 0;
    animation: fadeIn 800ms 800ms ease-out forwards;
}

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

/* Floating vector-art icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.float-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    opacity: 0;
    animation: floatFadeIn 1000ms ease-out forwards;
}

.icon-branch {
    top: 15%;
    left: 12%;
    animation-delay: 1000ms;
}

.icon-merge {
    top: 22%;
    right: 14%;
    animation-delay: 1200ms;
}

.icon-community {
    bottom: 25%;
    left: 18%;
    animation-delay: 1400ms;
}

.icon-code {
    bottom: 20%;
    right: 16%;
    animation-delay: 1600ms;
}

@keyframes floatFadeIn {
    to {
        opacity: 0.25;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 800ms 2000ms ease-out forwards;
}

.scroll-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #808870;
}

.scroll-indicator svg {
    animation: bobDown 2s ease-in-out infinite;
}

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

/* ======================================
   Timeline Section
   ====================================== */

#timeline {
    padding: 120px 24px;
    background-color: #E8E0D0;
}

.timeline-container {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.timeline-panel {
    background-color: #E8E0D0;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 6px 6px 16px #C8B8A0, -6px -6px 16px #F8F0E8;
    position: relative;
    opacity: 0;
    transition: opacity 500ms ease, transform 500ms ease, box-shadow 400ms ease;
}

.timeline-panel.panel-left {
    transform: translateX(-30px);
}

.timeline-panel.panel-right {
    transform: translateX(30px);
}

.timeline-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-panel.fully-visible {
    box-shadow: 8px 8px 20px #C8B8A0, -8px -8px 20px #F8F0E8;
}

.timeline-panel:hover {
    box-shadow: 10px 10px 24px #C8B8A0, -10px -10px 24px #F8F0E8;
    transform: translateY(-2px);
}

.panel-ornament {
    margin-bottom: 16px;
}

.panel-ornament svg {
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 600ms 200ms ease;
}

.timeline-panel.visible .panel-ornament svg {
    opacity: 1;
}

/* Ornament border trace animation */
.panel-ornament svg line,
.panel-ornament svg rect {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 800ms 300ms ease;
}

.timeline-panel.visible .panel-ornament svg line,
.timeline-panel.visible .panel-ornament svg rect {
    stroke-dashoffset: 0;
}

.panel-date {
    display: inline-block;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(20px, 2vw, 32px);
    color: #808870;
    margin-bottom: 8px;
}

.panel-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: 0.02em;
    color: #3A3830;
    margin-bottom: 16px;
}

.panel-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: #3A3830;
}

/* ======================================
   Gallery Section
   ====================================== */

#gallery {
    padding: 120px 24px;
    background-color: #E8E0D0;
}

.gallery-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 64px;
}

.gallery-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #808870;
    margin-bottom: 12px;
}

.gallery-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(28px, 3.5vw, 48px);
    letter-spacing: 0.02em;
    color: #3A3830;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 760px;
    margin: 0 auto;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 500ms ease;
}

.gallery-item.visible {
    opacity: 1;
}

.gallery-frame {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 16px;
    background-color: #E8E0D0;
    box-shadow: inset 4px 4px 8px #C8B8A0, inset -4px -4px 8px #F8F0E8;
    transition: box-shadow 400ms ease;
}

.gallery-frame svg {
    width: 80%;
    height: 80%;
    transition: filter 300ms ease;
    filter: saturate(0.6);
}

.gallery-item:hover .gallery-frame {
    box-shadow: inset 2px 2px 4px #C8B8A0, inset -2px -2px 4px #F8F0E8;
}

.gallery-item:hover .gallery-frame svg {
    filter: saturate(1);
}

.gallery-caption {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #808870;
}

/* ======================================
   Dedication Stone (Footer)
   ====================================== */

#dedication {
    padding: 80px 24px 60px;
    background-color: #E8E0D0;
}

.dedication-border {
    max-width: 760px;
    margin: 0 auto 48px;
    overflow: hidden;
}

.greek-key-border {
    width: 100%;
    height: 12px;
}

.dedication-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px;
    border-radius: 16px;
    background-color: #E8E0D0;
    box-shadow: inset 6px 6px 16px #C8B8A0, inset -6px -6px 16px #F8F0E8;
    text-align: center;
}

.dedication-title {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: 0.02em;
    color: #3A3830;
    margin-bottom: 24px;
}

.dedication-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: #3A3830;
    max-width: 600px;
    margin: 0 auto 32px;
}

.dedication-citations {
    margin-bottom: 40px;
}

.citation {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 17px);
    color: #808870;
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
}

.citation:last-child {
    margin-bottom: 0;
}

.citation-author {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    font-style: normal;
    color: #B89840;
    letter-spacing: 0.05em;
}

.dedication-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid #C8B8A0;
}

.footer-domain {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 20px);
    color: #3A3830;
    letter-spacing: 0.02em;
}

.footer-year {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #808870;
}

/* ======================================
   Responsive
   ====================================== */

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .timeline-panel {
        padding: 28px;
    }

    .dedication-content {
        padding: 32px 24px;
    }

    .seal-ornament {
        width: min(85vw, 340px);
        height: min(85vw, 340px);
    }

    .float-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .timeline-panel {
        padding: 24px;
    }

    .dedication-footer {
        flex-direction: column;
        gap: 8px;
    }
}
