/*
 * Fossil Forest - Main Stylesheet
 * True Coverflow Carousel - Touch/Drag Enabled
 */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #1d5037;
    --color-bg-cream: #fcfaf1;
    --color-folder: #d4b896;
    --color-note: #e5e8a7;
    --color-shadow: rgba(0, 0, 0, 0.2);
    --font-heading: 'Courier New', Courier, monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Folder dimensions - scaled up to fill 1080p better */
    --folder-width: 720px;
    --folder-height: 820px;
}

html,
body {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: #3d2a1d;
    background-image: url('assets/specimen-background.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-primary);
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: bold;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 35px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 0;
}

.header-content {
    background: var(--color-bg-cream);
    border: 2px solid var(--color-primary);
    box-shadow: 4px 4px 0px 0px var(--color-shadow);
    padding: 18px 34px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-label {
    font-family: var(--font-heading);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 28px;
    line-height: 32px;
    margin: 0;
    text-decoration: underline;
}

.site-title a {
    color: var(--color-primary);
    text-decoration: underline;
}

.site-description {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.15px;
}

.header-button {
    background: var(--color-bg-cream);
    border: 2px solid var(--color-primary);
    box-shadow: 4px 4px 0px 0px var(--color-shadow);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    align-self: flex-start;
}

.header-button:hover {
    transform: translateY(-2px);
}

.header-button svg {
    width: 24px;
    height: 24px;
}

/* Main Container */
.site-main {
    padding-top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.specimens-container {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 120px;
    /* Account for fixed header */
}

/* ============================================
   COVERFLOW CAROUSEL - True Center Focus
   ============================================ */

.folder-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.folder-carousel.dragging {
    cursor: grabbing;
}

.folder-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.folder-track.no-transition {
    transition: none;
}

/* Individual Folder Card - positioned from screen center */
.specimen-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--folder-width);
    height: var(--folder-height);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    transform: translateX(-50%) translateY(-50%);
    filter: drop-shadow(8px 8px 12px rgba(0, 0, 0, 0.4));
}

/* Folder Visual Structure */
.folder-outer {
    position: relative;
    width: 100%;
    height: 100%;
}

.folder-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Folder Content - Contained within folder */
.folder-content {
    position: absolute;
    top: 292px;
    left: 14px;
    right: 55px;
    overflow: hidden;
}

.specimen-label {
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 13px;
    letter-spacing: 0.98px;
    text-transform: uppercase;
    margin-bottom: 7px;
    color: var(--color-primary);
}

.specimen-name {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 7px;
    color: var(--color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alternative-names {
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.specimen-date {
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 17px;
    color: var(--color-primary);
}

/* Notes Section on Folder - Contained */
.notes-section {
    position: absolute;
    top: 411px;
    left: 14px;
    right: 14px;
    width: auto;
    max-width: 690px;
    background: var(--color-note);
    border: 1.6px solid var(--color-primary);
    padding: 14px 19px;
    min-height: 135px;
    overflow: hidden;
}

.notes-label {
    font-family: var(--font-heading);
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.94px;
    text-transform: uppercase;
    margin-bottom: 7px;
    color: var(--color-primary);
}

.notes-content {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 11px;
    line-height: 18px;
    letter-spacing: -0.12px;
    color: var(--color-primary);
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.notes-additional {
    font-family: var(--font-heading);
    font-size: 10px;
    line-height: 12px;
    letter-spacing: 0.94px;
    color: var(--color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Dossier Number Badge - Matching Figma */
.dossier-number {
    position: absolute;
    top: 232px;
    left: 14px;
    background: var(--color-note);
    border: 0.9px solid var(--color-primary);
    padding: 14px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dossier-number span {
    font-family: var(--font-heading);
    font-size: 20px;
    line-height: 7px;
    letter-spacing: 0.52px;
    color: var(--color-primary);
}

/* View Details Button */
.view-details-btn {
    position: absolute;
    bottom: 33px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-cream);
    border: 2px solid var(--color-primary);
    padding: 13px 26px;
    font-family: var(--font-heading);
    font-size: 15px;
    letter-spacing: 0.55px;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.view-details-btn:hover {
    background: var(--color-note);
    transform: translateX(-50%) translateY(-2px);
}

/* Hidden images container */
.specimen-images {
    display: none;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */

.no-specimens {
    text-align: center;
    padding: 60px 20px;
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--color-bg-cream);
}

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

.site-footer {
    background: var(--color-bg-cream);
    border-top: 2px solid var(--color-primary);
    padding: 20px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 12px;
    color: var(--color-primary);
}

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

@media (max-width: 1400px) {
    :root {
        --folder-width: 550px;
        --folder-height: 626px;
    }

    .folder-content {
        top: 223px;
    }

    .notes-section {
        top: 313px;
        width: 528px;
        min-height: 103px;
    }

    .dossier-number {
        top: 177px;
    }

    .specimen-name {
        font-size: 21px;
    }
}

@media (max-width: 1100px) {
    :root {
        --folder-width: 450px;
        --folder-height: 512px;
    }

    .site-header {
        top: 15px;
        width: calc(100% - 30px);
    }

    .site-main {
        padding-top: 130px;
    }

    .specimens-container {
        height: calc(100vh - 130px);
    }

    .folder-content {
        top: 182px;
    }

    .notes-section {
        top: 256px;
        width: 432px;
        min-height: 85px;
        padding: 10px 14px;
    }

    .dossier-number {
        top: 145px;
        padding: 10px 12px;
    }

    .dossier-number span {
        font-size: 15px;
    }

    .specimen-name {
        font-size: 18px;
    }

    .specimen-label,
    .specimen-date,
    .alternative-names {
        font-size: 11px;
    }
}

@media (max-width: 800px) {
    :root {
        --folder-width: 350px;
        --folder-height: 398px;
    }

    .header-content {
        padding: 12px 20px;
    }

    .site-title {
        font-size: 22px;
    }

    .header-button {
        display: none;
    }

    .folder-content {
        top: 142px;
        left: 10px;
        right: 40px;
    }

    .notes-section {
        top: 199px;
        left: 10px;
        width: 336px;
        min-height: 66px;
        padding: 8px 11px;
    }

    .dossier-number {
        top: 113px;
        left: 10px;
        padding: 8px 10px;
    }

    .dossier-number span {
        font-size: 12px;
    }

    .specimen-name {
        font-size: 15px;
    }

    .specimen-label,
    .specimen-date {
        font-size: 9px;
    }

    .notes-label {
        font-size: 7px;
    }

    .notes-content {
        font-size: 8px;
        line-height: 13px;
    }
}

/* Animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.specimen-card {
    animation: fadeIn 0.5s ease-out backwards;
}