/* =====================================================================
   THE SIDE QUEST - site.css
   A cozy storybook-tavern theme. Built from scratch (no framework).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Nunito:wght@400;600;700;800&display=swap');

/* ---------- Palette ---------- */
:root {
    --parchment:   #efe3c8;
    --parchment-2: #e6d6b3;
    --cream:       #f8efda;
    --cream-2:     #f1e4c6;
    --ink:         #2a1d11;
    --ink-soft:    #483728;
    --wood:        #3a2618;
    --wood-deep:   #261810;
    --wine:        #74232a;
    --wine-deep:   #511319;
    --gold:        #bd8c2e;
    --gold-bright: #dcad44;
    --sage:        #6b7a4a;
    --sage-deep:   #525f37;
    --ember:       #c0551f;
    --ember-deep:  #9a4015;
    --rose:        #bb8782;
    --frame:       #cba75f;
    --shadow:      rgba(38, 24, 16, 0.28);

    --font-display: 'Cinzel', Georgia, serif;
    --font-head:    'Fraunces', Georgia, serif;
    --font-body:    'Nunito', system-ui, sans-serif;

    --maxw: 1080px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.7;
    background-color: var(--parchment);
    background-image:
        radial-gradient(rgba(120, 95, 55, 0.045) 1px, transparent 1.2px),
        radial-gradient(rgba(120, 95, 55, 0.045) 1px, transparent 1.2px),
        linear-gradient(165deg, #f2e8d1 0%, #ece0c2 100%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    background-position: 0 0, 15px 15px, 0 0;
    background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 { margin: 0 0 .5rem; color: var(--wood); line-height: 1.2; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: .5px; }
h3 { font-family: var(--font-head); font-weight: 600; color: var(--wine); font-size: 1.35rem; }
h4 { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
p { margin: 0 0 1rem; }

/* Offset anchor jumps so the sticky navbar doesn't cover section titles */
.section, .hero, [id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }

/* Ornamental divider under section titles */
.flourish {
    text-align: center;
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: .6em;
    text-indent: .6em;
    margin: -.25rem 0 1.5rem;
}

/* =====================================================================
   NAV
   ===================================================================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--wood) 0%, var(--wood-deep) 100%);
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 3px 16px var(--shadow);
}
.site-nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .55rem;
    padding-bottom: .55rem;
}
.brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--cream);
    letter-spacing: 1px;
}
.brand:hover { color: var(--gold-bright); }
.brand .d20 { color: var(--gold); margin-right: .4rem; }

.nav-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: #f0e6d2;
    font-weight: 700;
    font-size: .98rem;
    padding: .2rem 0;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 820px) {
    .nav-toggle-label {
        display: block;
        cursor: pointer;
        font-size: 1.6rem;
        color: var(--cream);
        line-height: 1;
        user-select: none;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 0;
        background: var(--wood-deep);
        border-bottom: 4px solid var(--gold);
        padding: .5rem 1.25rem 1rem;
    }
    .nav-links a { padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(220, 173, 68, 0.22), transparent 70%),
        linear-gradient(180deg, #2f1d12 0%, #3a2618 55%, #4a2f1d 100%);
    color: var(--cream);
    text-align: center;
    padding: 3rem 1.25rem 3.25rem;
    border-bottom: 5px solid var(--gold);
}
.hero-logo { max-height: 180px; margin: 0 auto 1rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gold-bright);
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    letter-spacing: 2px;
    margin: 0 0 .5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.hero .tagline {
    font-family: var(--font-head);
    font-style: italic;
    font-size: clamp(1.05rem, 2.6vw, 1.4rem);
    color: #f3e7cf;
    margin: 0 auto .5rem;
    max-width: 52ch;
    text-wrap: balance;
}
.hero .lede { color: #e9dcc2; max-width: 56ch; margin: 0 auto 1.5rem; }

.hero-badge {
    display: inline-block;
    background: rgba(116, 35, 42, 0.6);
    border: 1.5px solid var(--gold);
    color: var(--gold-bright);
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.social-row { margin-top: 1.5rem; }
.social-row a { color: #f0e6d2; margin: 0 .55rem; font-size: 1.5rem; display: inline-block; transition: color .15s, transform .15s; }
.social-row a:hover { color: var(--gold-bright); transform: translateY(-2px); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1rem;
    padding: .65rem 1.3rem;
    border-radius: 11px;
    border: 2px solid var(--wood-deep);
    box-shadow: 0 3px 0 var(--shadow);
    cursor: pointer;
    transition: transform .08s ease, box-shadow .08s ease, background .15s;
    color: #fff;
    background: var(--wine);
    text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--shadow); color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--shadow); }
.btn-gold   { background: var(--gold); border-color: #8c6418; color: #2c2008; }
.btn-gold:hover { background: var(--gold-bright); color: #2c2008; }
.btn-ember  { background: var(--ember); border-color: var(--ember-deep); }
.btn-ember:hover { background: var(--ember-deep); }
.btn-sage   { background: var(--sage); border-color: var(--sage-deep); }
.btn-sage:hover { background: var(--sage-deep); }
.btn-small  { padding: .3rem .8rem; font-size: .9rem; border-radius: 9px; }

/* =====================================================================
   SECTIONS & PANELS
   ===================================================================== */
.section { padding: 2.75rem 0; }
.section:nth-of-type(even) { background: rgba(255,255,255,0.18); }
.section-head { text-align: center; margin-bottom: 1.75rem; }
.section-head p { max-width: 60ch; margin: .25rem auto 0; color: var(--ink-soft); }

.panel {
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 16px;
    box-shadow: 0 6px 22px var(--shadow), inset 0 0 0 4px rgba(203, 167, 95, 0.16);
    padding: 1.5rem;
}

/* Card grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
}
.tile {
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 14px;
    box-shadow: 0 5px 16px var(--shadow);
    padding: 1.4rem;
    text-align: center;
}
.tile .ic {
    font-size: 1.8rem;
    color: var(--gold);
    background: var(--wine);
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 auto .75rem;
    box-shadow: 0 3px 8px var(--shadow);
}
.tile h3 { text-align: center; color: var(--wine); }
.tile p { text-align: center; margin-bottom: 0; }
.tile .game-badge { display: inline-block; margin: .15rem 0 .6rem; }
.tcg-set { margin: 0 0 .15rem !important; color: var(--ink-soft); font-size: .92rem; }
.tcg-set strong { color: var(--wine); }
.tcg-price { margin: .4rem 0 0 !important; }
.tcg-price strong { color: var(--wine); font-family: var(--font-display); font-size: 1.2rem; }

/* Game icons inline with the game name */
.game-icon { display: inline-block; height: 28px; width: auto; vertical-align: middle; margin-right: .45rem; }
.game-head { color: var(--wine); }

/* Inset info boxes */
.note-box {
    background: var(--cream-2);
    border: 1px solid var(--frame);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.note-box.center { text-align: center; max-width: 560px; margin: 1.25rem auto 0; }

/* Highlight "third place" banner */
.banner {
    background: linear-gradient(160deg, var(--wine) 0%, var(--wine-deep) 100%);
    color: #f6e8cf;
    border-radius: 16px;
    border: 2px solid var(--gold);
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 6px 22px var(--shadow);
}
.banner h2 { color: var(--gold-bright); }
.banner p { color: #f3e3c6; max-width: 60ch; margin: 0 auto; }

/* Event/promo cards stacked */
.stack-card {
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 13px;
    box-shadow: 0 4px 14px var(--shadow);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
}
.stack-card h4 { color: var(--wine); margin-bottom: .15rem; }
.stack-card .when { font-family: var(--font-head); font-style: italic; color: var(--ink-soft); margin-bottom: .5rem; }
.stack-card ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.stack-card li { margin-bottom: .2rem; }

/* Fee table */
.fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.fee {
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 13px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 4px 14px var(--shadow);
    text-align: center;
}
.fee .price { font-family: var(--font-display); font-weight: 700; color: var(--wine); font-size: 1.6rem; }
.fee .price small { font-size: .9rem; color: var(--ink-soft); font-family: var(--font-body); font-weight: 700; }

/* Game availability badges */
.game-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 1.5rem; }
.game-badge { font-size: .85rem; font-weight: 800; padding: .35rem .85rem; border-radius: 999px; border: 2px solid transparent; }
.game-badge.available { background: var(--sage); color: #fff; border-color: var(--sage-deep); }
.game-badge.soon { background: transparent; color: var(--wood); border-color: var(--gold); border-style: dashed; }

/* Sticker guide */
.stickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-top: 1rem; }
.sticker { text-align: center; width: 116px; }
.sticker .dot { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto .35rem; box-shadow: 0 2px 6px var(--shadow); }
.sticker strong { display: block; font-size: .92rem; }
.sticker small { color: var(--ink-soft); }

/* Visit / contact */
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.visit-grid .note-box strong { color: var(--wine); }
.hours-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.hours-list li { display: flex; justify-content: space-between; padding: .2rem 0; border-bottom: 1px dashed rgba(94,74,57,.25); }
.hours-list li:last-child { border-bottom: none; }
.hours-list .day { font-weight: 700; }

.map-embed {
    width: 100%;
    height: 210px;
    border: 1px solid var(--frame);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    display: block;
}

/* =====================================================================
   CALENDAR  (script-driven; ids/classes preserved)
   ===================================================================== */
.calendar { max-width: 640px; margin: 0 auto; }
.gcal-wrap { max-width: 820px; margin: 0 auto; border: 1px solid var(--frame); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px var(--shadow); background: var(--cream); }
.gcal-wrap iframe { width: 100%; height: 600px; display: block; border: 0; }
@media (max-width: 560px) { .gcal-wrap iframe { height: 500px; } }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.calendar-header h4 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; color: var(--wine); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7,1fr); font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); text-align: center; margin-bottom: .35rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.cal-cell { background: var(--cream-2); border: 1px solid var(--frame); border-radius: 9px; min-height: 72px; padding: 3px 4px; position: relative; }
.cal-empty { background: transparent; border: none; }
.cal-daynum { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.cal-cell.has-events { cursor: pointer; background: #fff; box-shadow: 0 2px 6px var(--shadow); }
.cal-cell.has-events:hover { background: #fffdf6; border-color: var(--gold); }
.cal-cell.today { outline: 3px solid var(--gold); outline-offset: -1px; }
.cal-cell.cal-closed { background: #e3dccd !important; }
.cal-cell.cal-closed .cal-daynum { color: #9a8f7e; }
.cal-chips { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cal-chip { font-size: .68rem; font-weight: 800; line-height: 1.3; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.calendar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 1rem; font-size: .82rem; font-weight: 700; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .cal-chip { text-indent: -9999px; padding: 0; height: 7px; border-radius: 3px; } }

.event-list { max-width: 640px; margin: 1.5rem auto 0; }
.event-list-title { text-align: center; font-family: var(--font-display); color: var(--wine); }
.event-item { background: var(--cream); border: 1px solid var(--frame); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .65rem; display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; box-shadow: 0 2px 8px var(--shadow); }
.event-main { display: flex; flex-direction: column; }
.event-main strong { color: var(--wood); font-size: 1.05rem; }
.event-meta { font-size: .85rem; color: var(--ink-soft); }
.event-detail-list { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.add-cal { white-space: nowrap; }
.add-cal-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.add-cal-menu { display: flex; flex-direction: column; gap: .3rem; }
.add-cal-menu[hidden] { display: none; }
.cal-opt { font-family: inherit; font-size: .82rem; font-weight: 700; text-align: center; padding: .3rem .65rem; border-radius: 8px; border: 1.5px solid var(--frame); background: var(--cream-2); color: var(--wine); white-space: nowrap; cursor: pointer; }
.cal-opt:hover { background: var(--gold); color: #2c2008; border-color: var(--gold); }
.event-more-note { text-align: center; font-style: italic; color: var(--ink-soft); margin-top: .25rem; }
@media (max-width: 480px) { .cal-cell { min-height: 52px; } .event-item { flex-direction: column; } .add-cal-wrap { align-self: stretch; align-items: stretch; } .add-cal { width: 100%; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
    background: linear-gradient(180deg, var(--wood) 0%, var(--wood-deep) 100%);
    border-top: 5px solid var(--gold);
    color: #f0e6d2;
    text-align: center;
    padding: 2rem 1.25rem;
}
.site-footer a { color: var(--gold-bright); }
.site-footer .foot-tag { font-family: var(--font-head); font-style: italic; margin-top: .5rem; color: #e6d6b6; }

/* =====================================================================
   FAQ PAGE
   ===================================================================== */
.faq-item { background: var(--cream); border: 1px solid var(--frame); border-radius: 13px; box-shadow: 0 4px 14px var(--shadow); padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
.faq-item h4 { color: var(--wine); display: flex; align-items: center; gap: .55rem; }
.faq-item h4 .fa-dice-d20 { color: var(--gold); }
.faq-item p { margin: .35rem 0 0; }
.faq-item p:last-child { margin-bottom: 0; }

/* =====================================================================
   GAME FINDER (games.html) - grid-compat + cards
   ===================================================================== */
.row { display: flex; flex-wrap: wrap; margin: 0 -.5rem; }
.row > [class*="col-"] { padding: .5rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.flex-spaces { justify-content: space-between; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: .4rem; }
.flex-middle { align-items: center; }
@media (min-width: 600px) { .sm-6 { flex: 0 0 50%; max-width: 50%; } .sm-8 { flex: 0 0 66.66%; max-width: 66.66%; } }
@media (min-width: 768px) { .md-3 { flex: 0 0 25%; max-width: 25%; } .md-4 { flex: 0 0 33.33%; max-width: 33.33%; } }
@media (min-width: 992px) { .lg-4 { flex: 0 0 33.33%; max-width: 33.33%; } }

.finder-head {
    text-align: center;
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 14px;
    box-shadow: 0 5px 16px var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.finder-head .sub { color: var(--ink-soft); font-family: var(--font-head); font-style: italic; }

.filter-controls {
    background: var(--cream);
    border: 1px solid var(--frame);
    border-radius: 14px;
    box-shadow: 0 5px 16px var(--shadow);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.filter-controls label { font-weight: 800; display: block; margin-bottom: .25rem; color: var(--wood); font-size: .9rem; }
.filter-controls input[type="number"], .filter-controls select {
    width: 100%;
    border-radius: 9px;
    border: 1px solid var(--frame);
    background: #fff;
    padding: .45rem .6rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}
.badge { display: inline-block; font-weight: 800; font-size: .75rem; padding: .3rem .6rem; border-radius: 8px; background: var(--wine); color: #fff; }
.badge.secondary { background: var(--gold); color: #2c2008; }

.card { position: relative; background: var(--cream); display: flex; flex-direction: column; height: 100%; border: 1px solid var(--frame); border-radius: 14px; box-shadow: 0 5px 16px var(--shadow); overflow: hidden; }
.card-image { width: 100%; height: 175px; overflow: hidden; border-bottom: 2px solid var(--frame); display: flex; align-items: center; justify-content: center; padding: .5rem; background: var(--cream-2); }
.card-image img { width: auto; height: 175px; object-fit: contain; }
.card-body { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { color: var(--wine); margin-bottom: .35rem; }
.card-text { min-height: 3rem; font-size: .9rem; }
.card-body > .row:last-child { margin-top: auto; }
.icon-text { display: flex; align-items: center; gap: 5px; font-size: .9rem; color: var(--ink-soft); }

.badge-stack { position: absolute; top: 10px; right: 10px; z-index: 10; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.difficulty-badge, .two-player-badge { margin: 0; line-height: 1; padding: .3rem .55rem; border-radius: 7px; font-weight: 800; font-size: .72rem; }
.light    { background-color: #7d9b6f; color: #fff; }
.med-light{ background-color: #d8a24a; color: #2a1c06; }
.medium   { background-color: #7c3a5e; color: #fff; }
.med-heavy{ background-color: #c2762e; color: #fff; }
.heavy    { background-color: #a23f2e; color: #fff; }
.text-muted { color: var(--ink-soft); }
.btn-block { display: block; width: 100%; }
