/* ==========================================================================
   Zenuz — event photo-finder design system
   Glamorous & elegant: ivory canvas, deep burgundy, gilded accents.
   Framework-free. Brand: burgundy / ink / gold.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand */
  --brand: #8c1d36;          /* deep wine burgundy */
  --brand-600: #6f1429;
  --brand-700: #560f20;
  --brand-100: #f4e3e6;
  --ink: #1a1722;            /* near-black aubergine */
  --ink-700: #2e2935;
  --gold: #b8893f;           /* antique gold */
  --gold-200: #e7d3a8;
  --gold-soft: #f3e9d4;

  /* Surfaces & text */
  --bg: #f4efe8;             /* warm ivory */
  --surface: #fffdfa;        /* cream white */
  --surface-2: #f8f2ea;
  --border: #e6ddcf;         /* soft sand hairline */
  --text: #211d28;
  --muted: #7a7281;

  /* Feedback */
  --success: #1f9d63;
  --success-bg: #e7f6ee;
  --danger: #c0392b;
  --danger-bg: #fbeae8;
  --info-bg: #f3ece1;

  /* Spacing scale (4px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* Radius & shadow */
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(26, 23, 34, .05), 0 2px 6px rgba(26, 23, 34, .06);
  --shadow-md: 0 8px 24px rgba(26, 23, 34, .10);
  --shadow-lg: 0 30px 70px rgba(26, 23, 34, .28);

  /* Type */
  --font-body: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;   /* elegant editorial serif */
  --font-brand: "Cinzel", Georgia, serif;                 /* engraved luxury wordmark */

  --container: 1200px;
}

/* ------------------------------ Base ------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 100% -5%, var(--gold-soft), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, var(--brand-100), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); line-height: 1.12; margin: 0 0 var(--s-3); font-weight: 600; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: .005em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 var(--s-3); }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-600); text-decoration: underline; }
img { max-width: 100%; display: block; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .88em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-7) 0; }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.stack > * + * { margin-top: var(--s-4); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--r-sm); }

/* Eyebrow + ornamental divider (reusable elegance) */
.eyebrow {
  display: inline-block; color: var(--brand); font-family: var(--font-brand);
  font-weight: 600; letter-spacing: .32em; text-transform: uppercase; font-size: .72rem;
}
.ornament { display: flex; align-items: center; justify-content: center; gap: var(--s-3); color: var(--gold); margin: var(--s-3) 0; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 64px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament span { font-size: .7rem; letter-spacing: .2em; }

/* ------------------------------ Header ----------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--s-5); height: 72px; }
.brand { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-brand); font-weight: 600; font-size: 1.2rem; letter-spacing: .14em; color: var(--text); text-transform: uppercase; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand__mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-200), var(--gold) 55%, var(--brand-700));
  display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), var(--shadow-sm);
}
.nav { display: flex; gap: var(--s-1); margin-left: auto; align-items: center; }
.nav a { color: var(--text); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; letter-spacing: .01em; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.is-active { background: var(--brand); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: var(--r-sm); width: 44px; height: 44px; cursor: pointer; color: var(--text); }

@media (max-width: 760px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--s-2); box-shadow: var(--shadow-md); display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); }
}

/* ------------------------------ Hero ------------------------------------- */
.hero {
  position: relative; text-align: center; padding: var(--s-8) 0;
  background:
    radial-gradient(800px 320px at 50% -20%, var(--brand-100), transparent 70%),
    linear-gradient(180deg, var(--surface), transparent);
  border-bottom: 1px solid var(--border);
}
.hero h1 { margin-top: var(--s-2); }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Compact hero for task pages (album search) */
.hero--compact { padding: var(--s-5) 0 var(--s-6); }
.hero--compact h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-top: 4px; }
.hero--compact p.lead { font-size: 1rem; }
.hero--compact + .section { padding-top: var(--s-6); }

/* ------------------------------ Cards ------------------------------------ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
}
.card + .card { margin-top: var(--s-5); }
.card__title { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }
.card__title::before {
  content: ""; width: 3px; height: 1.1em; border-radius: 3px; flex: 0 0 auto;
  background: linear-gradient(var(--gold), var(--brand));
}

/* ------------------------------ Buttons ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-body); font-weight: 700; font-size: .92rem; letter-spacing: .03em;
  padding: var(--s-3) var(--s-6); border-radius: var(--r-pill);
  border: 1px solid var(--border); cursor: pointer;
  transition: background .18s ease, transform .06s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
  background: var(--surface); color: var(--text); text-decoration: none;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { background: linear-gradient(180deg, var(--brand), var(--brand-600)); color: #fff; border-color: var(--brand-600); }
.btn--primary:hover { background: linear-gradient(180deg, var(--brand-600), var(--brand-700)); color: #fff; }
.btn--gold { background: linear-gradient(180deg, var(--gold-200), var(--gold)); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { color: var(--ink); }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { filter: brightness(.94); color: #fff; }
.btn--sm { padding: var(--s-2) var(--s-4); font-size: .82rem; }
.btn--icon { padding: 0; width: 40px; height: 40px; border-radius: 50%; }
.btn--block { width: 100%; }

/* ------------------------------ Forms ------------------------------------ */
.field { margin-bottom: var(--s-5); }
/* Field heading label (not the choice cards, which are also <label>s) */
.field > label:not(.choice), .field label.field__label {
  display: block; font-family: var(--font-brand); font-weight: 600; margin-bottom: var(--s-2);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-700);
}
/* Text-style inputs + selects only — never checkboxes/radios */
.field input:not([type="checkbox"]):not([type="radio"]), .field select, input.input, select.input {
  font: inherit; width: 100%;
  padding: 13px var(--s-4);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field select:focus, input.input:focus, select.input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
  background: var(--surface);
}
.field--inline { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.range-row { display: flex; align-items: center; gap: var(--s-4); }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); }
.range-row input[type="number"] { max-width: 90px; }
.range-value { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3ch; color: var(--brand); }

/* Dropzone */
.dropzone {
  display: block; border: 1.5px dashed var(--gold-200); border-radius: var(--r-md);
  padding: var(--s-7) var(--s-5); text-align: center; cursor: pointer;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: var(--brand-100); box-shadow: var(--shadow-sm); }
.dropzone input[type="file"] { display: none; }
.dropzone__icon { color: var(--brand); margin-bottom: var(--s-2); }
.dropzone__hint { color: var(--muted); font-size: .9rem; }
.dropzone__preview { max-height: 200px; margin: var(--s-4) auto 0; border-radius: var(--r-sm); box-shadow: var(--shadow-md); }

/* Popover / inline notice */
.popover { background: var(--info-bg); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--r-md); padding: var(--s-4); margin-top: var(--s-3); font-size: .92rem; }
.popover ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); }
[hidden] { display: none !important; }

/* Choice cards (radio group, nicer than a bare select) */
.choice { display: block; border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.choice + .choice { margin-top: var(--s-2); }
.choice:hover { border-color: var(--gold-200); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-100); }
.choice__row { display: flex; align-items: center; gap: var(--s-3); }
.choice__row input { accent-color: var(--brand); }
.choice__title { font-weight: 700; }
.choice__desc { color: var(--muted); font-size: .85rem; margin: 4px 0 0 28px; }

/* ------------------------------ Modal ------------------------------------ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,12,18,.55); backdrop-filter: blur(3px); z-index: 95; display: none; align-items: center; justify-content: center; padding: var(--s-5); }
.modal-backdrop.is-open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow: auto; animation: modal-in .2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border); }
.modal__head h2 { margin: 0; }
.modal__close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); width: 38px; height: 38px; border-radius: 50%; }
.modal__close:hover { background: var(--surface-2); color: var(--text); }
.modal__body { padding: var(--s-6); }
.modal__foot { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border); display: flex; gap: var(--s-3); justify-content: flex-end; }

/* ------------------------------ Upload progress -------------------------- */
.upload-progress { margin-top: var(--s-4); }
.upload-bar { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); overflow: hidden; }
.upload-bar__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--brand)); transition: width .2s ease; }
.upload-bar__text { margin: var(--s-2) 0 0; font-size: .85rem; }

/* ------------------------------ Status strip ----------------------------- */
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); }
.status-strip__item { display: flex; align-items: baseline; gap: var(--s-2); }
.status-strip__num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--brand); }
.status-strip__label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }

/* ------------------------------ Auth (login / passcode) ------------------ */
.auth { display: grid; grid-template-columns: 1.05fr .95fr; min-height: calc(100vh - 72px); }
.auth__aside {
  position: relative; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--s-8) var(--s-7);
  background:
    radial-gradient(600px 300px at 80% 10%, color-mix(in srgb, var(--gold) 40%, transparent), transparent 60%),
    linear-gradient(150deg, var(--brand-700), var(--ink) 70%);
}
.auth__aside::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(2px 2px at 70% 60%, rgba(231,211,168,.6), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 85% 25%, rgba(255,255,255,.35), transparent);
  opacity: .8;
}
.auth__aside .brand__mark { width: 56px; height: 56px; font-size: 1.3rem; margin-bottom: var(--s-5); }
.auth__aside h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); position: relative; }
.auth__aside p { color: rgba(255,255,255,.78); max-width: 38ch; position: relative; }
.auth__aside .ornament { justify-content: flex-start; }
.auth__aside .ornament::before { display: none; }

.auth__main { display: flex; align-items: center; justify-content: center; padding: var(--s-7) var(--s-5); }
.auth__card { width: 100%; max-width: 420px; }
.auth__card h1 { text-align: center; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth__aside { display: none; }
  .auth__main { padding: var(--s-7) var(--s-5); }
}

/* ------------------------------ Gallery grid ----------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-4); }
.tile {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  aspect-ratio: 4 / 3; cursor: zoom-in; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.07); }
.badge {
  position: absolute; top: var(--s-2); left: var(--s-2); z-index: 2;
  background: linear-gradient(180deg, var(--gold-200), var(--gold)); color: var(--ink);
  font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  padding: 3px var(--s-3); border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
}

/* Card used as a clickable link tile (album lists) */
a.card { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
a.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--gold-200); text-decoration: none; }

/* Media card — album tile with a cover image */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-5); margin-top: var(--s-6); }
.media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.media-card__cover { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--surface-2), var(--gold-soft)); overflow: hidden; }
.media-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.media-card:hover .media-card__cover img { transform: scale(1.05); }
.media-card__cover--empty { display: grid; place-items: center; color: var(--gold); }
.media-card__body { padding: var(--s-4) var(--s-5) var(--s-5); }
.media-card__body h3 { margin: 0; }
.media-card__path { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; padding: 4px 12px; border-radius: var(--r-pill); white-space: nowrap; border: 1px solid transparent; }
.chip--public { background: #edf1ea; color: #4d6b54; border-color: #dde6da; }   /* refined sage */
.chip--gold { background: var(--gold-soft); color: var(--brand-700); border-color: var(--gold-200); }
.chip--muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.chip--count { background: transparent; color: var(--muted); padding-left: 0; border: none; }

/* Page header with action on the right */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Empty / error state */
.state { text-align: center; padding: var(--s-7) var(--s-4); color: var(--muted); }
.state__icon { color: var(--gold); margin-bottom: var(--s-3); }

/* ------------------------------ Pagination ------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: center; margin-top: var(--s-6); }

/* ------------------------------ Toasts ----------------------------------- */
.toast-wrap { position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 100; display: flex; flex-direction: column; gap: var(--s-2); max-width: 360px; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); box-shadow: var(--shadow-md); animation: toast-in .2s ease; }
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast--info { border-left-color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------ Lightbox --------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(15,12,18,.94); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.lightbox__btn { position: absolute; background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.18); width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; transition: background .15s ease; }
.lightbox__btn:hover { background: rgba(184,137,63,.5); }
.lightbox__prev { left: var(--s-5); }
.lightbox__next { right: var(--s-5); }
.lightbox__close { top: var(--s-5); right: var(--s-5); width: 44px; height: 44px; font-size: 1.3rem; }

/* ------------------------------ Stat grid (admin) ------------------------ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s-4); }
.stat { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-5) var(--s-4); text-align: center; }
.stat__num { font-family: var(--font-display); font-size: 1.9rem; color: var(--brand); }
.stat__label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.manage-tile .tile__del { position: absolute; top: var(--s-2); right: var(--s-2); z-index: 3; }

/* ------------------------------ Capture ---------------------------------- */
.capture-stage { max-width: 760px; margin: 0 auto; }
.video-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); background: #000; aspect-ratio: 4 / 3; }
.video-frame video, .video-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.status-pill { display: inline-flex; align-items: center; gap: var(--s-2); margin: var(--s-4) auto 0; padding: var(--s-2) var(--s-5); border-radius: var(--r-pill); background: var(--brand-100); color: var(--brand-600); font-weight: 700; }

/* ------------------------------ Footer ----------------------------------- */
.site-footer { margin-top: auto; background: linear-gradient(180deg, var(--ink), var(--brand-700)); color: #ddd5d8; padding: var(--s-7) 0 var(--s-5); }
.site-footer h3 { color: #fff; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-6); }
.footer-contact li { display: flex; gap: var(--s-2); margin-bottom: var(--s-2); list-style: none; }
.footer-contact { padding: 0; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: var(--s-6); padding-top: var(--s-4); color: rgba(255,255,255,.6); font-size: .86rem; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

/* ------------------------------ Scroll-to-top ---------------------------- */
.to-top { position: fixed; bottom: var(--s-5); left: var(--s-5); z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(180deg, var(--brand), var(--brand-600)); color: #fff; box-shadow: var(--shadow-md); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ------------------------------ Tables (admin) --------------------------- */
table { border-collapse: collapse; }

/* ------------------------------ Motion ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .tile:hover img, .btn:hover, .tile:hover, a.card:hover { transform: none; }
}
