/* Appelon Consort – public website */

/* Sharphy by Atipo (atipofoundry.com/fonts/sharphy); files in css/fonts/.
   A missing weight falls back to the nearest one that is present. */
@font-face { font-family: "Sharphy"; font-weight: 400; font-style: normal; font-display: swap;
    src: url("fonts/Sharphy-Regular.woff2") format("woff2"), url("fonts/Sharphy-Regular.otf") format("opentype"); }
@font-face { font-family: "Sharphy"; font-weight: 400; font-style: italic; font-display: swap;
    src: url("fonts/Sharphy-Italic.woff2") format("woff2"), url("fonts/Sharphy-Italic.otf") format("opentype"); }
@font-face { font-family: "Sharphy"; font-weight: 500; font-style: normal; font-display: swap;
    src: url("fonts/Sharphy-Medium.woff2") format("woff2"), url("fonts/Sharphy-Medium.otf") format("opentype"); }
@font-face { font-family: "Sharphy"; font-weight: 700; font-style: normal; font-display: swap;
    src: url("fonts/Sharphy-Bold.woff2") format("woff2"), url("fonts/Sharphy-Bold.otf") format("opentype"); }

:root {
    --wine: #5e1a24;
    --wine-dark: #43111a;
    --gold: #b8955a;
    --gold-light: #e6d3ad;
    --cream: #faf6ef;
    --paper: #ffffff;
    --ink: #2b2320;
    --muted: #6f6560;
    --line: #e4dccf;
    --success: #2f6b3a;
    --error: #a3262e;
    --radius: 6px;
    --sans: "Sharphy", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: var(--sans); /* headings use Sharphy too */
    --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 { font-family: var(--serif); font-weight: normal; line-height: 1.25; color: var(--wine); }
h1 { font-size: 2.3rem; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .3em; }
a { color: var(--wine); }
a:hover { color: var(--gold); }
img, video { max-width: 100%; height: auto; }
audio { width: 100%; max-width: 480px; }

/* ---------- Header: name + buttons in the top row ---------- */

.site-header {
    background: var(--wine);
    color: #fff;
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand { display: flex; align-items: center; margin-right: auto; }
.brand-logo { display: block; height: 96px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-btn {
    color: #fff;
    text-decoration: none;
    padding: 7px 18px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: .95rem;
    transition: background .15s, border-color .15s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: var(--gold-light); }
.nav-btn.active { background: var(--gold); border-color: var(--gold); color: var(--wine-dark); }
.nav-extra { display: flex; align-items: center; gap: 14px; margin-left: 12px; font-size: .88rem; }
.nav-link { color: var(--gold-light); text-decoration: none; }
.nav-link:hover, .nav-link.active { color: #fff; text-decoration: underline; }
.lang-switch { display: flex; gap: 6px; color: var(--gold-light); }
.lang-switch a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.lang-switch a:hover { color: #fff; }
.lang-switch strong { color: #fff; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: var(--radius);
    padding: 8px 9px;
    cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }

@media (max-width: 820px) {
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .nav-toggle { display: block; }
    .brand-logo { height: 36px; }
    .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
    .site-nav.open { display: flex; }
    .nav-btn { text-align: center; }
    .nav-extra { margin: 8px 0 0; justify-content: center; flex-wrap: wrap; }
}

/* ---------- Main ---------- */

.site-main { flex: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.content { padding-top: 40px; padding-bottom: 32px; }
.narrow { max-width: 480px; }
.muted { color: var(--muted); }

.hero {
    height: clamp(220px, 40vw, 440px);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.rich-text { max-width: 760px; }
.rich-text img { border-radius: var(--radius); }
.rich-text blockquote { border-left: 3px solid var(--gold); margin: 1em 0; padding: .2em 1em; color: var(--muted); font-style: italic; }

.btn {
    display: inline-block;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 26px;
    font: inherit;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--wine-dark); color: #fff; }
.btn-small { padding: 5px 16px; font-size: .85rem; }

/* ---------- Agenda ---------- */

.events { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.event {
    display: flex;
    gap: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    align-items: flex-start;
}
.event-date {
    flex: 0 0 76px;
    text-align: center;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 6px 0;
    line-height: 1.15;
    color: var(--wine);
}
.event-day { display: block; font-family: var(--serif); font-size: 2rem; }
.event-month { display: block; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; }
.event-year { display: block; font-size: .75rem; color: var(--muted); }
.event-body { flex: 1; min-width: 0; }
.event-meta { color: var(--muted); font-size: .92rem; margin: 0 0 .5em; }
.event-desc { margin-bottom: .6em; }
.event-img { width: 180px; border-radius: var(--radius); object-fit: cover; }
.past .event { opacity: .75; }
.event h3 a { color: inherit; text-decoration: none; }
.event h3 a:hover { color: var(--gold); }
.event-subtitle { margin: 0 0 .3em; font-style: italic; color: var(--ink); }
.event-subtitle.big { font-size: 1.2rem; margin-top: -.3em; }
.event-price { font-weight: 600; color: var(--wine); margin: .3em 0 .6em; }
.event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.btn-outline { background: transparent; color: var(--wine); border: 1px solid var(--wine); }
.btn-outline:hover { background: var(--wine); color: #fff; }

.event-detail-head { display: flex; gap: 20px; align-items: flex-start; margin: 16px 0 20px; }
.event-detail-head h1 { margin-bottom: .2em; }
.event-detail-img { display: block; max-height: 420px; width: 100%; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.event-box { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; max-width: 760px; }
.event-box h2 { font-size: 1.25rem; margin: .8em 0 .3em; }
.event-box h2:first-child { margin-top: 0; }

.narrow-wide { max-width: 760px; }
.ticket-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .ticket-row { grid-template-columns: 1fr; } }
.reg-total-line { font-size: 1.15rem; margin: 0; }
.reg-summary { border-collapse: collapse; margin-top: 8px; }
.reg-summary th { text-align: left; font-weight: normal; color: var(--muted); padding: 4px 24px 4px 0; vertical-align: top; }
.reg-summary td { padding: 4px 0; }
.reg-summary .reg-total th, .reg-summary .reg-total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; color: var(--ink); }
.past-events summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; color: var(--wine); margin: 1.5em 0 1em; }

@media (max-width: 600px) {
    .event { flex-wrap: wrap; }
    .event-img { width: 100%; }
}

/* ---------- Forms & notices ---------- */

.form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; color: var(--muted); }
.form input, .form textarea, .form select {
    font: inherit;
    color: var(--ink);
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.form .btn { align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 10px 14px; border-radius: var(--radius); border-left: 4px solid; background: var(--paper); }
.notice.success { border-color: var(--success); color: var(--success); }
.notice.error { border-color: var(--error); color: var(--error); }

/* ---------- Footer ---------- */

.site-footer { background: var(--wine-dark); color: var(--gold-light); margin-top: 48px; font-size: .88rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-btn { color: var(--gold-light); text-decoration: none; padding: 4px 14px; border: 1px solid rgba(230, 211, 173, .4); border-radius: 999px; }
.footer-btn:hover { color: #fff; border-color: var(--gold-light); background: rgba(255, 255, 255, .08); }

/* ---------- File manager (documents page + dashboard) ---------- */

.fm-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.fm-tab { font: inherit; padding: 6px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); }
.fm-tab.active { background: var(--wine); border-color: var(--wine); color: #fff; }
.fm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.fm-crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .95rem; margin-right: auto; }
.fm-crumbs button { background: none; border: none; font: inherit; color: var(--wine); cursor: pointer; padding: 2px 4px; text-decoration: underline; }
.fm-crumbs span.sep { color: var(--muted); }
.fm-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.fm-box.dragover { outline: 3px dashed var(--gold); outline-offset: -6px; }
.fm-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.fm-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.fm-table th, .fm-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fm-table td.fm-name { white-space: normal; word-break: break-word; width: 100%; }
.fm-table tr:last-child td { border-bottom: none; }
.fm-table a, .fm-table .fm-open { color: var(--ink); text-decoration: none; background: none; border: none; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.fm-table a:hover, .fm-table .fm-open:hover { color: var(--wine); text-decoration: underline; }
.fm-icon { display: inline-block; width: 1.4em; }
.fm-actions { display: flex; gap: 6px; justify-content: flex-end; }
.fm-actions button { font: inherit; font-size: .8rem; padding: 3px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); }
.fm-actions button:hover { border-color: var(--wine); color: var(--wine); }
.fm-actions button.danger:hover { border-color: var(--error); color: var(--error); }
.fm-empty, .fm-status { padding: 16px; color: var(--muted); }
.fm-hint { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.fm-error { color: var(--error); }
@media (max-width: 600px) {
    .fm-table .fm-col-date { display: none; }
}
