:root {
    --navy: #001f3f;       /* Deep Navy */
    --teal: #004d4d;       /* Blue-Green */
    --brass: #b8860b;      /* Dark Gold/Brass */
    --leather: #3d2b1f;    /* Dark Brown */
    --paper: #e5d3b3;      /* Aged Parchment */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--navy);
    font-family: 'Special+Elite', courier, serif; /* Typewriter feel */
    color: var(--paper);
    
    /* STICKY FOOTER ENGINE: Forces the page to fill the screen and pushes the footer down */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
    box-sizing: border-box;
}

/* Nav Bar - Metallic Plate Look */
.dwarf-nav {
    background: linear-gradient(to bottom, #222, #111);
    border-bottom: 4px solid var(--brass);
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.logo {
    font-family: 'Cinzel', serif;
    color: var(--brass);
    font-size: 1.5rem;
    letter-spacing: 3px;
}

.dwarf-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.dwarf-nav a {
    text-decoration: none;
    color: var(--paper);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
}

.dwarf-nav a:hover {
    color: var(--brass);
    text-shadow: 0 0 8px var(--brass);
}

/* Hero Section - The Blueprint */
.hero-section {
    height: 80vh;
    background: var(--navy); 
    /* Subtle 'blueprint grid' effect */
    background-image: 
        linear-gradient(rgba(0, 77, 77, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 77, 77, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    border: 10px double var(--brass); /* The "Metal" Outer Border */
    padding: 50px;
    background: rgba(0, 0, 0, 0.7); 
    max-width: 700px;

    /* Stitched look */
    outline: 2px dashed rgba(229, 211, 179, 0.4); 
    outline-offset: -15px; 
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: var(--brass);
    margin: 10px 0;
}

.brass-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: var(--brass);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #555;
    box-shadow: 4px 4px 0px #333;
    transition: 0.2s;
}

.brass-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #333;
}

/* Blueprint Section Background */
.blueprint-section {
    padding: 80px 20px;
    background-color: var(--navy);
    /* Heavy blueprint grid using his Teal color */
    background-image: 
        linear-gradient(var(--teal) 2px, transparent 2px),
        linear-gradient(90deg, var(--teal) 2px, transparent 2px);
    background-size: 100px 100px;
    border-top: 5px solid var(--brass);
}

.section-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    color: var(--brass);
    font-size: 2.5rem;
    margin-bottom: 50px;
}

/* Flexbox layout to put Before and After side-by-side */
.schematic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.schematic-card {
    background: rgba(0, 31, 63, 0.9); /* Navy with transparency */
    border: 2px solid var(--brass);
    padding: 15px;
    width: 400px;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
}

.card-header {
    background: var(--brass);
    color: #000;
    padding: 5px 10px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 0.8rem;
}

.image-frame {
    background: #000;
    height: 250px;
    border: 1px solid var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 1. Default State: Slightly dimmed and vintage-tinted */
.image-frame img {
    max-width: 100%;
    filter: sepia(0.4) contrast(1.1) brightness(0.8); /* Starts darker and antique */
    transform: scale(1.0);
    transition: all 0.4s ease; /* Smoothly transitions color, brightness, and size */
}

/* 2. Hover State: Explodes into bright, crisp, true-to-life color and zooms slightly */
.image-frame:hover img {
    filter: sepia(0) contrast(1.2) brightness(1.1); /* Strips the tint, makes it crisp and vibrant */
    transform: scale(1.05); /* Gives a subtle "zoom in" effect to make it feel alive */
}

.specs {
    margin-top: 15px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    color: var(--paper);
    border-top: 1px dashed var(--brass);
    padding-top: 10px;
}

/* The Connector Gear */
/* Center Column Connector System */
.schematic-connector {
    position: relative;
    width: 60px;
    height: 320px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.schematic-connector .line {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--brass);
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--brass);
}

/* Styling the clickable layout rivets */
.track-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #111;
    border: 2px solid var(--brass);
    color: var(--paper);
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.track-node:hover {
    background: var(--brass);
    color: #000;
    box-shadow: 0 0 10px var(--brass);
}

/* Visual Cogwheel Styling */
.slider-cog {
    position: absolute;
    left: 50%;
    top: 10%; /* Starts perfectly aligned with Node I */
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    color: var(--brass);
    text-shadow: 0 0 10px rgba(0,0,0,1);
    z-index: 2;
    pointer-events: none;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Gives a magical snap animation */
}

.materials-section {
    padding: 60px 20px;
    background-color: var(--teal); /* Use the blue-green here for contrast */
    text-align: center;
    border-top: 3px solid var(--brass);
}

.palette-title {
    font-family: 'Cinzel', serif;
    color: var(--paper);
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.palette-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.swatch {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--brass);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 5px 5px 10px rgba(0,0,0,0.3);
    background-size: cover;
}

/* --- Material Swatch Images --- */

.leather { 
    background-image: url('images/leather-texture.jpg'); 
}

.fiber { 
    background-image: url('images/cardboard-texture.jpg'); 
}

.brass { 
    background-image: url('images/metal-paint-texture.jpg'); 
}

.textile { 
    background-image: url('images/heavy-cloth-texture.jpg'); 
}

/* Collective styles for all swatches */
.swatch {
    background-position: center;
    background-size: cover;
    transition: transform 0.3s ease;
    filter: sepia(0.3) contrast(1.1);
}

.swatch:hover {
    transform: scale(1.1);
    filter: none;
}




/* Workshop Specific Styles */


.workshop-bg {
    background-color: var(--navy);
    background-image: radial-gradient(circle, var(--teal) 1px, transparent 1px);
    background-size: 30px 30px; /* Fine dots like a technical schematic */
}

.workshop-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}

.workshop-header {
    text-align: center;
    border-bottom: 2px solid var(--brass);
    margin-bottom: 50px;
    padding-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.gallery-card {
    background: #111;
    border: 3px solid var(--brass);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.gallery-card img {
    width: 100%;
    height: 250px;      /* This forces a consistent height */
    object-fit: cover;  /* This crops the image centered so it doesn't stretch */
    cursor: zoom-in;    /* Changes the mouse to a magnifying glass */
    border-bottom: 2px solid var(--brass);
    filter: grayscale(20%) contrast(1.1);
}

.card-info {
    padding: 20px;
    color: var(--paper);
}

.card-info h3 {
    font-family: 'Cinzel', serif;
    margin: 0 0 10px 0;
    color: var(--brass);
}

/* The "Vetted" or "Sold" Seal */
.card-seal {
    z-index: 10;          /* This lifts the seal above the image */
    pointer-events: none; /* This makes sure the seal doesn't block clicks on the image */
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--brass);
    color: black;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.price-tag {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--teal);
    font-style: italic;
    border-top: 1px dashed var(--brass);
    padding-top: 10px;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 31, 63, 0.95); /* Deep Navy */
    
    /* These three lines center everything vertically and horizontally */
    display: none; 
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    align-items: center;
}

.modal-content {
    margin: 0; /* Removes the auto-margin that might be pushing it away */
    display: block;
    max-width: 80%;
    max-height: 70vh; /* Changed from 80vh to 70vh to leave more 'floor space' for the caption */
    border: 5px solid var(--brass);
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}

.close-modal {
    position: absolute;
    top: 20px; right: 35px;
    color: var(--paper);
    font-size: 40px;
    cursor: pointer;
}

#caption {
    margin-top: 10px; /* Reduced from 20px to pull it tighter to the image */
    color: var(--paper); /* Aged paper color for the text */
    font-family: 'Special+Elite', courier, serif; /* Typewriter feel for 'specs' */
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
    border-top: 1px dashed var(--brass);
    padding-top: 10px;
    width: 80%; /* Match the width of the image */
    background: var(--brass);
    color: #000;
    padding: 5px 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}




/* Journal Specific Styles */

.journal-bg {
    background-color: var(--navy);
    /* Subtle paper texture overlay */
    background-image: url('https://www.transparenttextures.com');
}

.journal-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.journal-grid {
    column-count: 2; /* Creates the staggered 'Pinterest' look */
    column-gap: 40px;
}

.journal-entry {
    background: #e5d3b3; /* Aged Paper Color */
    padding: 15px;
    margin-bottom: 40px;
    break-inside: avoid; 
    position: relative;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.6);
    transform: rotate(-1.5deg);
    border: 1px solid #c5b393;
}

.journal-entry:nth-child(even) {
    transform: rotate(2deg); /* Alternates the tilt */
}

.journal-entry img {
    width: 100%;
    cursor: zoom-in;
    filter: sepia(0.2); /* Slight vintage filter */
}

.tape-piece {
    width: 100px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2); /* Masking tape look */
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    border-left: 2px dashed rgba(0,0,0,0.1);
    border-right: 2px dashed rgba(0,0,0,0.1);
}

.entry-meta {
    font-family: 'Special+Elite', cursive;
    color: #5d4037;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-weight: bold;
}

.journal-note {
    font-family: 'Special+Elite', cursive;
    color: #2b1d0e;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

/* Active Link Style for Nav */
.active {
    color: var(--brass) !important;
    border-bottom: 2px solid var(--brass);
}




/* About Page Specifics */

.about-container {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.profile-header {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 60px;
    flex-wrap: wrap; /* Stack on mobile */
}

/* Portrait Styling */
.portrait-frame {
    flex: 1;
    min-width: 300px;
    border: 8px solid var(--brass);
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.7);
}

.portrait-frame img {
    width: 100%;
    display: block;
    filter: contrast(1.1) sepia(0.2);
}

/* Character Sheet / Skill Bars */
.stat-block {
    flex: 1.5;
    min-width: 300px;
    background: rgba(0, 77, 77, 0.1); /* Very subtle Teal tint */
    padding: 20px;
    border-left: 4px solid var(--brass);
}

.character-name {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--brass);
    margin: 0;
}

.character-class {
    font-family: 'Special+Elite', cursive;
    color: var(--teal);
    margin-bottom: 30px;
}

.skill {
    margin-bottom: 20px;
}

.skill span {
    display: block;
    font-family: 'Special+Elite', cursive;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--paper);
}

.skill-bar {
    width: 100%;
    height: 10px;
    background: #111;
    border: 1px solid var(--brass);
    position: relative;
}

.skill-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--brass));
    box-shadow: 0 0 10px var(--teal);
}

/* Bio Content */
.bio-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) { .bio-section { grid-template-columns: 1fr; } }

.bio-card {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border: 1px solid var(--teal);
}

.bio-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--brass);
    border-bottom: 1px solid var(--brass);
    padding-bottom: 10px;
}

.bio-card p {
    font-family: 'Special+Elite', cursive;
    color: var(--paper);
    line-height: 1.6;
}




/* Commission Page Specifics */

.form-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: rgba(0, 31, 63, 0.9); /* Deep Navy */
    border: 4px double var(--brass);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    box-sizing: border-box; /* Keeps the container from leaking off-screen */
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.quest-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.form-group label {
    display: block;
    font-family: 'Special+Elite', cursive;
    color: var(--teal);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* Unified styling for all inputs to fix lengths and edges */
.quest-form input, 
.quest-form select, 
.quest-form textarea {
    width: 100%; /* Makes them all the same length */
    box-sizing: border-box; /* FIX: Padding now stays INSIDE the box */
    padding: 12px;
    background: #000;
    border: 1px solid var(--teal);
    color: var(--paper);
    font-family: 'Special+Elite', cursive;
    outline: none;
    transition: 0.3s;
}

/* FIX: Allows safe vertical expansion without breaking layout width */
.quest-form textarea {
    resize: vertical;      /* Allows up and down resizing only */
    min-height: 150px;     /* Sets a comfortable starting height */
    max-height: 400px;     /* Prevents them from stretching it forever */
}

/* Hover/Focus effect for that "Magical Activation" feel */
.quest-form input:focus, 
.quest-form select:focus,
.quest-form textarea:focus {
    border-color: var(--brass);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.4);
}

/* Styling the dropdown arrow so it looks Dwarven */
.quest-form select {
    cursor: pointer;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* This adds a simple brass-colored downward triangle */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org' ViewBox='0 0 20 20' fill='%23b8860b'%3E%3Cpath d='M7 7l3 3 3-3v2l-3 3-3-3V7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 25px;
    padding-right: 40px; /* Space for the arrow */
}

.quest-form .brass-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    margin-top: 10px;
    padding: 15px;
    background: var(--brass);
    color: #000;
    transition: 0.2s;
}

.quest-form .brass-btn:hover {
    background: var(--paper);
    box-shadow: 0 0 15px var(--brass);
}




/* Footer Specifics */

.dwarf-footer {
    background: #111;
    border-top: 4px solid var(--brass);
    padding: 40px 20px;
    margin-top: 60px; /* Pushes it away from the content */
    text-align: center;
    color: var(--paper);
    font-family: 'Special+Elite', cursive;
    margin-top: auto; /* This "pushes" the footer to the bottom of the flex container */
}

.footer-content p {
    margin: 10px 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.social-links {
    margin: 20px 0;
}

.social-icon {
    color: var(--brass);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: 0.3s;
    text-transform: uppercase;
}

.social-icon:hover {
    color: var(--paper);
    text-shadow: 0 0 10px var(--brass);
}

.divider {
    color: var(--teal);
    margin: 0 15px;
}

.tagline {
    font-style: italic;
    color: var(--teal);
    font-size: 0.8rem;
    opacity: 0.8;
}




/* MOBILE FIXES */
@media (max-width: 768px) {
    /* Shrink the Hero text so it doesn't overflow */
    h1 { 
        font-size: 2.2rem; 
    }
    
    .hero-content { 
        padding: 20px; 
        margin: 10px; 
    }

    /* Navigation Layout Mobile Reset */
    .dwarf-nav {
        flex-direction: column;
        padding: 10px;
        align-items: center;
    }
    
    .logo { 
        margin-bottom: 10px; 
    }
    
    .dwarf-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        gap: 10px;
    }

    /* Stack the Blueprint (Before/After) cards vertically */
    .schematic-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .schematic-card { 
        width: 90%; 
    }
    
    /* Hide the gear/line on mobile to save space */
    .schematic-connector { 
        display: none; 
    }

    /* For mobile devices, stack the photos in 1 column */
    .journal-grid { 
        column-count: 1; 
    }
    
    /* Remove the tilt so it fits better on narrow screens */
    .journal-entry {
        transform: rotate(0deg) !important; 
        margin: 20px auto;
    }
}