/* ============================================================
   TIER-DEMO GALLERIES (edemo/sdemo/cdemo) - dark/gold theme
   Ported from the site owner's Key in the Door product (its own
   "Wisdom in Color" artist-site template, key-in-the-door repo,
   public/css/styles.css) at their request - same splash, hero,
   slideshow-with-music, and pen-write caption framework, trimmed to
   just what these three demo pages use (no thumb-grid gallery or
   painting-details page - those still use this site's own theme).
   Loaded ONLY on edemo/sdemo/cdemo's /, /home and /pricing - never
   linked from styles.css or any other page, so the rest of the site
   is untouched.
   ============================================================ */

@font-face {
    font-family: "Great Vibes";
    src: local("Georgia"), local("Times New Roman"), local("Cambria");
    unicode-range: U+2160-2188;
}

:root {
    --gold: #d4af37;
    --gold-bright: #ffe9a6;
    --gold-glow: rgba(212, 175, 55, 0.6);
    --bg: #0a0a0a;
    --panel: rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

body.kitd {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: #fff;
    overflow-x: hidden;
}

.gold-btn {
    display: inline-block;
    padding: 12px 22px;
    font-size: 1.05rem;
    color: #fff;
    background: var(--panel);
    border: 2px solid var(--gold);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px var(--gold-glow);
    transition: all 0.25s ease;
    cursor: pointer;
}
.gold-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 14px var(--gold-glow);
    transform: scale(1.05);
    color: #fff;
}
.gold-btn.small { padding: 8px 16px; font-size: 0.9rem; }
.gold-btn.is-inactive { opacity: 0.45; box-shadow: none; cursor: default; }
.gold-btn.is-inactive:hover { transform: none; box-shadow: none; color: #fff; }

.nav-fixed { position: fixed; bottom: 30px; z-index: 20; }
.nav-fixed.left  { left: 30px; }
.nav-fixed.right { right: 30px; }

/* ---------- Splash: "Welcome to the Art of [Tier]" ---------- */
.splash {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    gap: 16px;
}
.splash-welcome {
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
    margin: 0;
}
.splash-name {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(3.2rem, 10vw, 7rem);
    line-height: 1.15;
    color: var(--gold);
    text-shadow: 0 0 26px rgba(0, 0, 0, 0.85);
    margin: 0;
}
.splash-name .name-reveal { font-size: 1em; animation-duration: 2.4s; }
.splash-name .name-pen-tip { animation-duration: 2.4s; }
.splash-enter { margin-top: 18px; }
.splash-sub {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #ccc;
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0;
}

.name-write-wrap { position: relative; display: inline-block; }
.name-reveal {
    display: inline-block;
    animation: caption-write 1.6s ease-out forwards;
}
.name-pen-tip {
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-bright);
    box-shadow: 0 0 8px 2px var(--gold-glow);
    transform: translate(-50%, -50%);
    animation: caption-pen-move 1.6s ease-out forwards;
    pointer-events: none;
}

/* ---------- Home hub: hero + Tour Galleries + Pricing ---------- */
.home-bg { position: fixed; inset: 0; background-size: cover; background-position: center; z-index: -1; }
.home-lower {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
    overflow-y: auto;
    padding: 30px 16px;
}
.category-bar { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; width: 92%; max-width: 1100px; margin: 0 auto; }
.gold-btn.cursive-title-btn {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: 2.4rem;
    letter-spacing: 1px;
    color: #fff;
    padding: 8px 34px;
    margin: 0 0 24px 0;
}
.gold-btn.cursive-title-btn:hover { color: #fff; }

/* ============================================================
   PAINTINGS SLIDESHOW
   ============================================================ */
#slideshowOverlay {
    position: fixed; inset: 0; background: #000;
    display: none; align-items: center; justify-content: center; z-index: 200;
}
#slideshowOverlay.open { display: flex; }
#slideshowImage {
    max-width: 50vw; max-height: 92vh; width: auto; height: auto;
    object-fit: contain; border: 4px solid var(--gold); border-radius: 4px;
    opacity: 0; transition: opacity 1s ease; margin-left: 4vw;
}
#slideshowImage.visible { opacity: 1; }

@keyframes pz-zoom-in    { from { transform: scale(1)     translate(0, 0);     } to { transform: scale(1.15) translate(0, 0);     } }
@keyframes pz-zoom-out   { from { transform: scale(1.15)  translate(0, 0);     } to { transform: scale(1)    translate(0, 0);     } }
@keyframes pz-in-pan-lr  { from { transform: scale(1.06)  translate(2.5%, 0);  } to { transform: scale(1.15) translate(-2.5%, 0); } }
@keyframes pz-in-pan-rl  { from { transform: scale(1.06)  translate(-2.5%, 0); } to { transform: scale(1.15) translate(2.5%, 0);  } }
@keyframes pz-in-pan-td  { from { transform: scale(1.06)  translate(0, -2.5%); } to { transform: scale(1.15) translate(0, 2.5%); } }
@keyframes pz-out-pan-lr { from { transform: scale(1.15)  translate(2.5%, 0);  } to { transform: scale(1.06) translate(-2.5%, 0); } }
@keyframes pz-out-pan-rl { from { transform: scale(1.15)  translate(-2.5%, 0); } to { transform: scale(1.06) translate(2.5%, 0);  } }
@keyframes pz-out-pan-td { from { transform: scale(1.15)  translate(0, -2.5%); } to { transform: scale(1.06) translate(0, 2.5%); } }

#slideshowCaption {
    position: fixed; left: 5vw; top: 50%; transform: translateY(-50%);
    width: 24vw; max-width: 24vw; text-align: left;
    font-family: "Great Vibes", cursive; font-weight: 400; color: var(--gold);
    font-size: 2.6rem; line-height: 1.35; text-shadow: 0 0 18px rgba(0,0,0,0.9);
    z-index: 201; overflow-wrap: normal; word-break: normal;
    letter-spacing: 0.04em; font-kerning: none; font-variant-ligatures: none;
}
.caption-write-wrap { position: relative; display: block; }
#slideshowCaptionText { display: block; animation: caption-write 1.6s ease-out forwards; overflow-wrap: break-word; word-break: break-word; }
.caption-pen-tip {
    position: absolute; top: 50%; left: 0; width: 10px; height: 10px; border-radius: 50%;
    background: var(--gold-bright); box-shadow: 0 0 10px 3px var(--gold-glow);
    transform: translate(-50%, -50%); animation: caption-pen-move 1.6s ease-out forwards; pointer-events: none;
}
@keyframes caption-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes caption-pen-move { from { left: 0%; opacity: 1; } to { left: 100%; opacity: 0; } }

.slideshow-controls-left {
    position: fixed; bottom: 30px; left: 5vw; z-index: 201;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.slideshow-controls-row { display: flex; gap: 10px; }
.slideshow-controls-right {
    position: fixed; bottom: 30px; right: 5vw; z-index: 201;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}

.music-credit {
    position: fixed; bottom: 6px; right: 10px; margin: 0;
    font-size: 10px; letter-spacing: .02em; color: rgba(255, 255, 255, 0.45);
    max-width: 60vw; text-align: right; pointer-events: none; z-index: 3;
}

/* ============================================================
   PIECE DETAIL PAGE ("/piece/:id" - painting.html's layout)
   ============================================================ */
#detailsContainer { position: fixed; inset: 0; display: flex; background: black; }
#detailsLeft { width: 40%; padding: 60px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
#detailsRight { width: 60%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; }
#paintingImage { width: auto; height: auto; max-width: 100%; max-height: 68vh; object-fit: contain; border: 4px solid var(--gold); border-radius: 4px; }
#paintingTitle { font-size: 2.2rem; font-weight: 700; color: var(--gold); margin: 0 0 6px; line-height: 1.2; }
#paintingMedium { font-size: 1.3rem; color: #eee; margin-bottom: 4px; }
#paintingDimensions { font-size: 1.1rem; color: #ccc; margin-bottom: 4px; }
#paintingLot { font-size: 1.05rem; font-weight: 700; letter-spacing: 1px; color: var(--gold-bright); margin-bottom: 6px; }

.availability-badge {
    display: inline-block; margin: 14px 0; padding: 6px 14px; border-radius: 20px;
    font-size: 0.9rem; font-weight: 700; letter-spacing: 0.5px; width: fit-content;
    background: #444; color: #ddd;
}

.return-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.return-nav-label { color: #ccc; font-size: 1rem; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.return-nav-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

#enlargeOverlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.97);
    display: none; align-items: center; justify-content: center; z-index: 100;
}
#enlargeOverlay.open { display: flex; }
#enlargeImage { max-width: 100vw; max-height: 100vh; width: auto; height: auto; object-fit: contain; }

@media (max-width: 900px) {
    #detailsContainer { flex-direction: column; overflow-y: auto; }
    #detailsLeft, #detailsRight { width: 100%; padding: 30px; }
    #detailsRight { order: -1; }
    #paintingImage { max-height: 45vh; }
}

/* ============================================================
   STATIC GALLERY ("/gallery" and "/gallery?cat=..." - gallery.html /
   category.html's layout)
   ============================================================ */
.kitd-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 28px; background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid rgba(212, 175, 55, 0.35); backdrop-filter: blur(6px);
}
.kitd-brand { text-decoration: none; letter-spacing: 0.5px; }
.brand-label { font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: 1.15rem; color: #fff; }
.kitd-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.kitd-nav a { color: #e8e4da; text-decoration: none; font-size: 0.92rem; letter-spacing: 0.5px; cursor: pointer; }
.kitd-nav a:hover { color: var(--gold-bright); }

.kitd-gallery { padding: 8px 28px 100px; max-width: 1300px; margin: 0 auto; }
.kitd-category .gallery-title { margin: 44px 0 24px; }
.kitd-category:first-child .gallery-title { margin-top: 30px; }

.gallery-title { text-align: center; margin: 50px 0 30px 0; color: var(--gold); font-size: 2rem; font-weight: 300; letter-spacing: 2px; }

.thumb-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
    padding: 20px 40px 120px 40px; max-width: 1300px; margin: 0 auto;
}
.thumb-card {
    display: block; position: relative; border: 2px solid var(--gold); border-radius: 6px;
    overflow: hidden; cursor: pointer; background: #111; text-decoration: none; color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.thumb-card:hover { transform: scale(1.04); box-shadow: 0 0 16px var(--gold-glow); }
.thumb-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.thumb-caption { display: block; padding: 10px 12px; font-size: 0.95rem; color: #e8e4da; background: rgba(0,0,0,0.7); text-align: center; text-decoration: none; }
/* Only the caption is a link; this stretches it over the whole card. */
.thumb-card .card-link::after { content: ""; position: absolute; inset: 0; }
.thumb-card:focus-within { box-shadow: 0 0 0 3px var(--gold-bright); }
.thumb-card .card-link:focus { outline: none; }
.empty-state { text-align: center; color: #999; font-size: 1.1rem; padding: 60px 20px; }

@media (max-width: 600px) {
    .thumb-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; padding: 15px 15px 100px 15px; }
    .thumb-card img { height: 170px; }
    .nav-fixed { position: static; display: inline-block; margin: 8px; }
}

/* ---------- Pricing page (about.html's layout, repurposed) ---------- */
.about-page { max-width: 820px; margin: 0 auto; padding: 60px 24px 140px 24px; }
.about-header { text-align: center; margin-bottom: 36px; }
.about-name { margin: 0 0 6px 0; color: var(--gold); font-size: 2.2rem; font-weight: 700; letter-spacing: 1px; }
.about-subtitle { margin: 0; color: #ccc; font-size: 1.1rem; font-style: italic; }
.about-price { margin: 18px 0 0; color: var(--gold-bright); font-size: 1.6rem; font-weight: 700; }
.about-offer { margin: 10px 0 0; color: #eee; font-size: 1.1rem; line-height: 1.5; }
.about-promise { color: #ccc; font-size: 0.95rem; font-style: italic; line-height: 1.5; max-width: 640px; margin: 22px auto 0; }
.about-btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.about-bio { text-align: center; }
.about-bio p { color: #eee; font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px 0; }
.about-features {
    list-style: none; margin: 24px auto 0; padding: 0; max-width: 480px;
    text-align: left; display: grid; gap: 10px;
}
.about-features li {
    color: #eee; font-size: 0.98rem; line-height: 1.5; padding-left: 22px; position: relative;
}
.about-features li::before {
    content: "\2726"; position: absolute; left: 0; color: var(--gold); font-size: 0.85rem;
}

/* ---------- "/compare" - all four tiers, side by side ---------- */
.compare-page { max-width: 720px; margin: 0 auto; padding: 60px 24px 140px 24px; text-align: center; }
.compare-title { color: var(--gold); font-size: 2.2rem; font-weight: 700; letter-spacing: 1px; margin: 0 0 36px; }
.compare-grid { display: grid; gap: 18px; }
.compare-card { border: 2px solid var(--gold); border-radius: 8px; padding: 18px 22px; text-align: left; background: var(--panel); }
.compare-card.current { border-color: var(--gold-bright); box-shadow: 0 0 14px var(--gold-glow); }
.compare-card h2 { margin: 0 0 4px; color: var(--gold); font-size: 1.3rem; font-weight: 700; }
.compare-card .compare-badge { display: inline-block; margin-left: 10px; font-size: 0.72rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: #0a0a0a; background: var(--gold-bright); padding: 2px 8px; border-radius: 10px; vertical-align: middle; }
.compare-card .compare-price { color: var(--gold-bright); font-size: 1.1rem; font-weight: 700; margin: 4px 0; }
.compare-card p { color: #ccc; margin: 4px 0; font-size: 0.95rem; }

@media (max-width: 600px) {
    .gold-btn.cursive-title-btn { font-size: 1.7rem; padding: 8px 22px; margin-bottom: 16px; }
    .home-lower { gap: 14px; }
    .category-bar { gap: 10px; }
    .category-bar .gold-btn { font-size: 0.85rem; padding: 9px 16px; }

    #slideshowOverlay { flex-direction: column; justify-content: center; padding: 16px; gap: 12px; }
    #slideshowImage { max-width: 92vw; max-height: 52vh; margin-left: 0; }
    #slideshowCaption {
        position: static; left: auto; top: auto; transform: none;
        width: 92vw; max-width: 92vw; text-align: center; font-size: 1.9rem; line-height: 1.3; margin-top: 4px;
    }
    .slideshow-controls-left, .slideshow-controls-right { position: static; align-items: center; }
    .slideshow-controls-left { margin-top: 10px; }
    .slideshow-controls-right { margin-top: 4px; }

    .about-photo { width: 140px; height: 175px; }
    .about-name { font-size: 1.6rem; }
    .about-bio p { font-size: 0.98rem; }
}
