/* Goldys PG "calm glass" look (owner approved 30-Nov-2026).
   Warm cream ground with slow, soft colour blobs, frosted-glass header and cards, Fraunces headings + Inter text,
   gold gradient buttons and an arched hero picture with a slow zoom. Loaded after every other stylesheet, so it
   only re-skins: tokens first, then surfaces. Visitor pages get real glass (backdrop blur); signed-in screens get
   the same colours, fonts and radii; staff screens stay plain and fast (no blobs, no blur on lists).
   Fonts are self-hosted (the CSP allows font-src 'self' only). Reduced motion: nothing moves. */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('/apps/shared/fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/apps/shared/fonts/inter-latin-wght-normal.woff2') format('woff2'); }

/* ---------- tokens (light) ---------- */
:root {
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans", "Noto Sans Oriya", "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
  --font-display: Fraunces, "Iowan Old Style", Georgia, "Noto Sans", "Noto Sans Oriya", "Noto Sans Devanagari", "Noto Sans Bengali", serif;
  --bg: #F6EFE6;
  --bg-sunken: #F1E8DC;
  --chrome: rgba(255, 250, 243, 0.62);
  --r-card: 24px;
  --r-input: 14px;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-solid: rgba(255, 255, 255, 0.74);
  --glass-line: rgba(255, 255, 255, 0.75);
  --glass-sh: 0 20px 50px rgba(90, 60, 30, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glass-blur: blur(22px) saturate(140%);
  --gold-grad: linear-gradient(145deg, #9A6914, #6E470C);   /* #FFF8EC text: 4.5:1 at the light end */
  --gold-grad-hover: linear-gradient(145deg, #8C5F10, #62400A);
  --gold-glow: 0 14px 30px -8px rgba(138, 90, 18, 0.45);
  --on-gold: #FFF8EC;
  --blob-a: rgba(244, 178, 120, 0.55);
  --blob-b: rgba(170, 196, 160, 0.50);
  --blob-c: rgba(232, 160, 170, 0.40);
}
/* ---------- tokens (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120E; --bg-sunken: #120E0B; --chrome: rgba(30, 24, 19, 0.62);
    --glass: rgba(46, 37, 30, 0.55); --glass-solid: rgba(40, 32, 26, 0.82); --glass-line: rgba(255, 236, 205, 0.12);
    --glass-sh: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 236, 205, 0.08);
    --gold-grad: linear-gradient(145deg, #EAC362, #C58A2B); --gold-grad-hover: linear-gradient(145deg, #F1CF78, #CF9633);
    --gold-glow: 0 14px 30px -10px rgba(224, 181, 74, 0.35); --on-gold: #1A1511;
    --blob-a: rgba(196, 120, 60, 0.22); --blob-b: rgba(90, 120, 90, 0.20); --blob-c: rgba(160, 80, 100, 0.18);
  }
}
:root[data-theme="dark"] {
  --bg: #17120E; --bg-sunken: #120E0B; --chrome: rgba(30, 24, 19, 0.62);
  --glass: rgba(46, 37, 30, 0.55); --glass-solid: rgba(40, 32, 26, 0.82); --glass-line: rgba(255, 236, 205, 0.12);
  --glass-sh: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 236, 205, 0.08);
  --gold-grad: linear-gradient(145deg, #EAC362, #C58A2B); --gold-grad-hover: linear-gradient(145deg, #F1CF78, #CF9633);
  --gold-glow: 0 14px 30px -10px rgba(224, 181, 74, 0.35); --on-gold: #1A1511;
  --blob-a: rgba(196, 120, 60, 0.22); --blob-b: rgba(90, 120, 90, 0.20); --blob-c: rgba(160, 80, 100, 0.18);
}

/* ---------- the ground: soft colour blobs (one fixed, GPU-only layer; none on staff screens) ---------- */
html:not([data-shell="staff"]) body { background: transparent; }
html:not([data-shell="staff"]) body::before {
  content: ""; position: fixed; inset: -10vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 14% 14%, var(--blob-a), transparent 70%),
    radial-gradient(48vmax 48vmax at 92% 38%, var(--blob-b), transparent 70%),
    radial-gradient(38vmax 38vmax at 40% 92%, var(--blob-c), transparent 70%);
}
@media (prefers-reduced-motion: no-preference) {
  html[data-shell="visitor"] body::before { animation: gl-drift 28s ease-in-out infinite alternate; will-change: transform; }
}
@keyframes gl-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(3vmax, 2vmax, 0) scale(1.06); } 100% { transform: translate3d(-2vmax, -1.5vmax, 0) scale(1.02); } }

/* ---------- headings ---------- */
.t-large, .t-title, .t-title2, .pub-h2, .pub-hero__title, .brand-name { font-family: var(--font-display); }
.brand-name small { font-family: var(--font); }
.t-large, .t-title, .pub-h2 { font-weight: 600; letter-spacing: -0.015em; }
.pub-hero__title { font-weight: 600; letter-spacing: -0.02em; line-height: 1.03; }
.pub-hero__title, .pub-h2 { font-variation-settings: normal; }

/* ---------- glass chrome: top bar, tab bar, side rail ---------- */
.topbar, .tabbar { background: var(--chrome); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
@media (min-width: 1024px) {
  html:not([data-shell="staff"]) .sidenav { background: var(--chrome); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-line); box-shadow: 1px 0 0 var(--line); }
  html:not([data-shell="staff"]) .sidenav__item[aria-current="page"] { background: var(--glass-solid); box-shadow: var(--glass-sh); }
}

/* ---------- buttons: gold gradient primary, glass secondary ---------- */
.btn--primary { background: var(--gold-grad); color: var(--on-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--gold-glow); }
.btn--primary:hover:not(:disabled) { background: var(--gold-grad-hover); }
.btn--primary:active:not(:disabled) { background: var(--gold-grad-hover); }
html:not([data-shell="staff"]) .btn--secondary { background: var(--glass-solid); box-shadow: 0 0 0 1px var(--glass-line) inset, 0 0 0 1px var(--line), var(--sh-1); }

/* ---------- cards: frosted glass on visitor pages, translucent (no blur) when signed in, plain for staff ---------- */
html:not([data-shell="staff"]) .card:not(.card--accent):not(.card--sunken) { background: var(--glass-solid); }
html:not([data-shell="staff"]) .card--raised { box-shadow: 0 0 0 1px var(--glass-line) inset, var(--glass-sh); }
.pub .card:not(.card--accent):not(.card--sunken), .pub-search {
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 0 0 1px var(--glass-line) inset, var(--glass-sh); border-radius: var(--r-card);
}
.pub .pub-sec .card { border-radius: var(--r-card); }

/* ---------- hero: the arched picture with a slow zoom ---------- */
.pub-hero__art { width: min(74%, 300px); }
.pub-hero__arch {
  position: relative; overflow: hidden; aspect-ratio: 5 / 6; border-radius: 999px 999px 28px 28px;
  border: 6px solid rgba(255, 255, 255, 0.7); box-shadow: 0 40px 80px -20px rgba(90, 60, 30, 0.35); background: var(--bg-sunken);
  isolation: isolate;
}
.pub-hero__arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 240, 220, 0) 60%, rgba(60, 40, 20, 0.30) 100%); pointer-events: none; }
.pub-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; transform-origin: 40% 50%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pub-hero__arch { border-color: rgba(255, 236, 205, 0.14); } }
:root[data-theme="dark"] .pub-hero__arch { border-color: rgba(255, 236, 205, 0.14); }
@media (min-width: 720px) { .pub-hero__art { max-width: 440px; } }
@media (prefers-reduced-motion: no-preference) {
  .pub-hero__photo { animation: gl-zoom 22s ease-in-out infinite alternate; will-change: transform; }
  .pub-hero__art { animation: pub-rise 900ms var(--ease) both, gl-float 7s ease-in-out 900ms infinite; }
}
@keyframes gl-zoom { from { transform: scale(1.02); } to { transform: scale(1.10) translate(-1.5%, -1%); } }
@keyframes gl-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.pub-hero__art img.pub-hero__photo { filter: none; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  html body::before, .pub-hero__photo, .pub-hero__art { animation: none !important; }
}
