:root {
    --sand: #e9d8b4;
    --parchment: #f6ecd3;
    --clay: #b5651d;
    --terracotta: #8c4a2f;
    --umber: #3b2a1a;
    --gold: #c9973a;
    --gold-light: #e8c36a;
    --ink: #2a1d12;
    --shadow: 0 8px 24px rgba(59, 42, 26, .25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Lora', Georgia, serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 10%, rgba(201,151,58,.12), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(140,74,47,.10), transparent 45%),
        var(--parchment);
    line-height: 1.6;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, #2b1c10 0%, #4a2f1a 60%, #6b4426 100%);
    color: var(--parchment);
    text-align: center;
    padding: 90px 20px 130px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px);
}
.hero-inner { position: relative; max-width: 760px; margin: auto; }
.glyph-row {
    font-size: 2rem; letter-spacing: .6rem; color: var(--gold-light);
    opacity: .85; margin-bottom: 14px;
}
.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: .08em;
    text-shadow: 0 3px 0 rgba(0,0,0,.35);
    color: var(--gold-light);
}
.tagline { margin: 14px 0 28px; font-style: italic; font-size: 1.1rem; color: var(--sand); }

/* sediment layers */
.strata { position: absolute; bottom: 0; left: 0; right: 0; height: 70px; display: flex; flex-direction: column; }
.strata span { flex: 1; }
.strata span:nth-child(1) { background: #8c6a3f; clip-path: polygon(0 40%, 25% 10%, 55% 45%, 80% 15%, 100% 40%, 100% 100%, 0 100%); }
.strata span:nth-child(2) { background: #a07a49; }
.strata span:nth-child(3) { background: #b58b55; }
.strata span:nth-child(4) { background: #c9a068; }
.strata span:nth-child(5) { background: var(--parchment); }
.strata.thin { position: static; height: 24px; margin-bottom: 18px; }
.strata.thin span:nth-child(1) { background: #8c6a3f; clip-path: none; }
.strata.thin span:nth-child(2) { background: #a07a49; }
.strata.thin span:nth-child(3) { background: #c9a068; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 26px;
    border-radius: 4px;
    letter-spacing: .05em;
    cursor: pointer;
    border: 2px solid var(--gold);
    transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-gold { background: var(--gold); color: var(--umber); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-download {
    margin-top: auto; width: 100%; text-align: center;
    background: var(--terracotta); color: var(--parchment); border-color: var(--umber);
}
.btn-download:hover { background: var(--umber); color: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-disabled {
    margin-top: auto; width: 100%; text-align: center;
    background: #d8c9a6; color: #8b7a5c; border-color: #bfae88; cursor: not-allowed;
}

/* ---------- LAYOUT ---------- */
.container { max-width: 1180px; margin: -30px auto 60px; padding: 0 20px; position: relative; }

.toolbar { margin-bottom: 30px; }
.section-title {
    font-family: 'Cinzel', serif; color: var(--umber);
    font-size: 1.8rem; border-bottom: 3px double var(--clay);
    padding-bottom: 10px; margin-bottom: 18px;
}
.section-title small { font-family: 'Lora', serif; font-size: .9rem; color: var(--terracotta); font-style: italic; margin-left: 10px; }

.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
#searchBox {
    flex: 1 1 260px; padding: 11px 16px; font-size: 1rem; font-family: inherit;
    background: #fffaf0; border: 2px solid var(--clay); border-radius: 4px; color: var(--ink);
}
#searchBox:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,58,.3); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-family: 'Cinzel', serif; font-size: .85rem; padding: 8px 16px; cursor: pointer;
    background: transparent; color: var(--umber); border: 2px solid var(--clay); border-radius: 20px;
    transition: all .2s;
}
.chip:hover { background: var(--sand); }
.chip.active { background: var(--clay); color: var(--parchment); }

/* ---------- CARDS ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }

.card {
    position: relative;
    display: flex; flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255,255,255,.45), rgba(233,216,180,.55)),
        var(--sand);
    border: 2px solid var(--clay);
    border-radius: 6px;
    padding: 28px 22px 22px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(59,42,26,.35); }
.card[hidden] { display: none; }

/* carved corners */
.corner { position: absolute; width: 14px; height: 14px; border: 3px solid var(--gold); }
.corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.logo-wrap {
    width: 160px; height: 160px; margin: 0 auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffaf0 55%, var(--sand));
    border: 3px solid var(--gold);
    box-shadow: inset 0 0 0 4px var(--parchment), 0 4px 10px rgba(0,0,0,.2);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.badge {
    align-self: center;
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
    background: var(--umber); color: var(--gold-light);
    padding: 3px 12px; border-radius: 20px; margin-bottom: 10px;
}
.card h3 {
    font-family: 'Cinzel', serif; text-align: center; color: var(--umber);
    font-size: 1.25rem; margin-bottom: 10px;
}
.desc { text-align: center; font-size: .96rem; margin-bottom: 16px; }

.meta {
    list-style: none; font-size: .85rem; margin-bottom: 18px;
    border-top: 1px dashed var(--clay); padding-top: 12px;
}
.meta li { display: flex; justify-content: space-between; padding: 2px 0; }
.meta strong { font-family: 'Cinzel', serif; color: var(--terracotta); font-size: .8rem; letter-spacing: .05em; }

.no-results { text-align: center; font-style: italic; color: var(--terracotta); margin-top: 30px; font-size: 1.1rem; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 0 20px 40px; color: var(--umber); font-size: .92rem; }
.footer a { color: var(--terracotta); }
.footer .note { font-size: .78rem; opacity: .75; margin-top: 6px; }

/* ---------- ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 80px);
    background: var(--umber); color: var(--gold-light);
    padding: 12px 22px; border-radius: 4px; border: 2px solid var(--gold);
    font-family: 'Cinzel', serif; font-size: .9rem;
    opacity: 0; transition: all .35s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
    .hero { padding: 60px 16px 110px; }
    .glyph-row { font-size: 1.4rem; letter-spacing: .3rem; }
    .logo-wrap { width: 140px; height: 140px; }
}
