/* ===== Olympian theme on the Pantheon brand (loaded after styles.css) =====
   Brand: charcoal #252527 · gold #B68D4D · off-white #F1EBE0 · Montserrat (UI) + Cinzel (display) */
@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url(/fonts/cinzel-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url(/fonts/cinzel-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url(/fonts/cinzel-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(/fonts/montserrat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url(/fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url(/fonts/montserrat-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url(/fonts/montserrat-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #252527; --panel: #2d2d30; --panel-2: #353538; --line: #46433f;
  --text: #F1EBE0; --muted: #bcb4a6; --gold: #B68D4D; --gold-2: #d8b77c; --gold-dim: #8a6a3a; --cream: #F1EBE0;
  --ok: #6fcf97; --warn: #e8b04a; --bad: #ef8a82;
  --leaf: linear-gradient(135deg, #e3c793 0%, #c9a263 26%, #B68D4D 50%, #d8b77c 72%, #a5804a 100%);
  --radius: 14px; --shadow: 0 10px 28px rgba(0,0,0,.35), inset 0 1px 0 rgba(241,235,224,.04);
  --serif: "Cinzel", Georgia, "Times New Roman", serif;
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cpath d='M0 11H20M2 11V1H17V8H6V4H13' fill='none' stroke='%23B68D4D' stroke-width='1.3'/%3E%3C/svg%3E");
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { background-color: var(--bg); }
body {
  background-image: radial-gradient(ellipse at 50% -10%, rgba(182,141,77,.10), transparent 55%),
    linear-gradient(rgba(37,37,39,.74), rgba(37,37,39,.8)), url(/img/marble.webp);
  background-size: auto, auto, 512px; background-attachment: fixed;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgba(182,141,77,.4); color: #fff; }
a { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* typography */
h1, h2, h3, .brand b, .caps, .stat, .tname, .hero-title { font-family: var(--serif); }
h1 { font-weight: 700; font-size: clamp(1.45rem, 4.6vw, 1.95rem); letter-spacing: .06em; line-height: 1.2;
  background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main > h1, .main .row > div > h1, .main > .row h1 { padding-bottom: 14px; margin-bottom: 14px; position: relative; }
.main > h1::after, .main .row > div > h1::after, .main > .row h1::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; max-width: 360px;
  background: var(--meander) repeat-x left center / 16px 8px; opacity: .8;
  -webkit-mask: linear-gradient(90deg, #000 70%, transparent); mask: linear-gradient(90deg, #000 70%, transparent);
}
h2 { font-weight: 600; letter-spacing: .05em; color: var(--gold-2); font-size: 1.1rem; }
h3 { font-weight: 600; letter-spacing: .04em; color: var(--text); }
.caps { text-transform: uppercase; letter-spacing: .16em; }
.stat { font-weight: 600; color: var(--gold-2); letter-spacing: .02em; }
.muted { color: var(--muted); }
th { font-family: "Montserrat", sans-serif; letter-spacing: .08em; }

/* chrome */
.side { background: linear-gradient(180deg, rgba(45,45,48,.95), rgba(33,33,35,.96)); border-right: 1px solid var(--line); }
.brand img { width: 40px; height: 40px; }
.brand b { font-family: "Montserrat", sans-serif; color: var(--cream); letter-spacing: .22em; font-weight: 600; }
.brand span { color: var(--gold-2); letter-spacing: .34em; font-weight: 500; }
.nav a { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #e4ddd0; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(182,141,77,.1); color: var(--gold-2); }
.nav a.active { background: linear-gradient(90deg, rgba(182,141,77,.24), rgba(182,141,77,.02)); color: var(--gold-2); border-left: 3px solid var(--gold); }
.tabs a { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.tabs a.active { color: var(--gold-2); border-color: var(--gold); }

/* cards with a meander top edge */
.card { background-color: var(--panel);
  background-image: var(--meander), linear-gradient(170deg, rgba(241,235,224,.035), transparent 40%);
  background-repeat: repeat-x, no-repeat; background-position: 0 4px, 0 0; background-size: 14px 7px, auto;
  border: 1px solid var(--line); border-top-color: rgba(182,141,77,.45); padding: 22px 18px 18px; box-shadow: var(--shadow); }
.card.click { transition: border-color .2s, transform .2s, box-shadow .2s; }
.card.click:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,.45), 0 0 0 1px rgba(182,141,77,.14); }
.empty { border: 1px dashed rgba(182,141,77,.35); background: rgba(182,141,77,.05); color: var(--muted); padding: 26px 18px; border-radius: 12px; }
.empty::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 10px; background: url(/logo.svg) center / contain no-repeat; opacity: .6; }
.banner { border-color: var(--gold-dim); background: rgba(182,141,77,.08); }

/* gold-leaf buttons with a sheen */
button, .btn { position: relative; overflow: hidden; border: 1px solid #9a7640; background: var(--leaf); background-size: 160% 160%; color: #1f1a12;
  font-weight: 600; letter-spacing: .03em; box-shadow: 0 2px 10px rgba(182,141,77,.18), inset 0 1px 0 rgba(255,250,235,.4);
  transition: transform .12s, box-shadow .2s, background-position .5s; }
button::after, .btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent); transform: skewX(-20deg); }
button:hover::after, .btn:hover::after { animation: sheen .9s ease; }
button:hover, .btn:hover { background-position: 100% 0; box-shadow: 0 4px 16px rgba(182,141,77,.3), inset 0 1px 0 rgba(255,250,235,.45); }
button:active, .btn:active { transform: translateY(1px) scale(.99); }
@keyframes sheen { to { left: 130%; } }
button.ghost, button.danger, .seg button, .scale button, .exitem, .set .chk, .habit, button.mini { box-shadow: none; }
button.ghost { background: transparent; color: var(--gold-2); border-color: var(--gold-dim); }
button.ghost::after, button.danger::after, .habit::after, .exitem::after, .seg button::after, .scale button::after, .set .chk::after { display: none; }
button.danger { background: transparent; color: var(--bad); border-color: #7a3a35; }
.seg button.on, .scale button.on, .chips .on { background: var(--leaf); color: #1f1a12; border-color: var(--gold); }
input, select, textarea { background: rgba(28,28,30,.85); border-color: var(--line); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(182,141,77,.18); }
label { color: var(--muted); }
.pill.gold { border-color: var(--gold-dim); color: var(--gold-2); background: rgba(182,141,77,.08); }
.badge { background: var(--leaf); color: #1f1a12; }
.bar > i { background: var(--leaf); }
.toast { background: linear-gradient(180deg, #38383b, #2b2b2e); border: 1px solid var(--gold-dim); color: var(--text); border-radius: 12px; font-weight: 500;
  animation: toastIn .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.msg.mine { background: linear-gradient(180deg, #4a3e2a, #3b3122); }
.wk-head { background: rgba(37,37,39,.96); }
.restbar { background: linear-gradient(180deg, #38383b, #2b2b2e); }
.restfill { background: rgba(182,141,77,.2); }
.habit.done { background: linear-gradient(90deg, rgba(182,141,77,.2), var(--panel-2)); }
.habit.done .tick { background: var(--leaf); border-color: var(--gold); color: #1f1a12; animation: pop .35s cubic-bezier(.2,.9,.3,1.4); }
.habit:active { transform: scale(.99); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.dots i.on { background: var(--gold); border-color: var(--gold); }
.pr-card { border-color: var(--gold-dim); background-color: #34302a; }
.start-card { background-color: #322e28; }
.type-lift { color: var(--gold-2); }

/* laurel badge (streaks, PRs) */
.laurel-badge { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); vertical-align: middle; flex: none; }
.laurel-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.laurel-badge b { position: relative; font-family: var(--serif); font-weight: 700; font-size: calc(var(--s) * .34); color: var(--gold-2); line-height: 1; }
.laurel-badge.pr b { font-size: calc(var(--s) * .3); }
.habit .streak { align-items: flex-end; gap: 0; }
.hero-laurel { margin: 0 auto 6px; animation: rise .6s cubic-bezier(.2,.9,.3,1.2) both; }
.hero-laurel b { font-size: 2.6rem; background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.summary-hero { margin: 10px 0 22px; text-align: center; }
.summary-hero h1 { margin: 6px 0 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.92); } }

/* colonnade divider (coach dashboard) */
.colonnade { margin: 6px 0 18px; height: 34px; }
.colonnade svg { width: 100%; height: 100%; display: block; }

/* spinner: brand column with a rotating laurel */
.spinner { position: relative; width: 58px; height: 58px; margin: 0 auto 12px; background: url(/logo.svg) center / 64% no-repeat; }
.spinner::before { content: ""; position: absolute; inset: 0; background: url(/img/spinner.svg) center / contain no-repeat; animation: spin 1.6s linear infinite; }
.loading { padding: 48px 0; display: grid; place-items: center; }
.boot { padding: 36vh 0 0; text-align: center; font-family: var(--serif); letter-spacing: .14em; color: var(--muted); font-size: .85rem; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }
.main > * { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* Hall of Olympus */
.olympus-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; font-family: var(--serif); letter-spacing: .06em; color: var(--gold-2); }
.trophy-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(160px, 46%), 1fr)); }
.trophy { text-align: center; padding: 14px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(53,53,56,.92), rgba(40,40,42,.92)); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.trophy .medal { filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.trophy.earned .medal { filter: drop-shadow(0 0 12px rgba(182,141,77,.4)); }
.trophy.gold { border-color: var(--gold); box-shadow: inset 0 0 30px rgba(182,141,77,.14); }
.trophy.silver { border-color: #8d9298; } .trophy.bronze { border-color: #8a5530; }
.trophy.locked .medal { filter: grayscale(1); opacity: .6; }
.tname { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); margin-top: 4px; }
.trophy.locked .tname { color: #b0a899; }
.ttitle { font-size: .78rem; color: var(--muted); font-style: italic; }
.tdesc { min-height: 2.4em; }
.tval { font-size: .85rem; }
.tier-pill { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin: 4px 0; }
.tier-pill.gold { background: linear-gradient(135deg, #e3c793, #B68D4D); color: #1f1a12; border-color: var(--gold); }
.tier-pill.silver { background: linear-gradient(135deg, #fff, #aeb3b9); color: #1c1f22; border-color: #8d9298; }
.tier-pill.bronze { background: linear-gradient(135deg, #f0c09a, #a8642f); color: #24130a; border-color: #8a5530; }
.bar.thin { height: 5px; width: 100%; margin: 4px 0; }
.tiers { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.tiers span { font-size: .66rem; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: #a49d91; }
.tiers span.on.bronze { color: #f0c09a; border-color: #8a5530; } .tiers span.on.silver { color: #e6e9ec; border-color: #8d9298; } .tiers span.on.gold { color: var(--gold-2); border-color: var(--gold); }

/* celebration overlay */
.celebrate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 50% 40%, rgba(182,141,77,.25), rgba(15,15,16,.9) 60%); animation: fadeIn .25s ease; }
.celebrate-card { position: relative; width: min(380px, 100%); text-align: center; padding: 26px 20px 20px; border-radius: 18px; border: 1px solid var(--gold);
  background: var(--meander) repeat-x 0 8px / 14px 7px, linear-gradient(180deg, #38383b, #29292b); box-shadow: 0 0 60px rgba(182,141,77,.28); animation: rise .5s cubic-bezier(.2,.9,.3,1.3) both; }
.celebrate-card .medal { margin: 10px auto 6px; display: block; animation: medalIn .8s cubic-bezier(.2,.9,.3,1.3) both; filter: drop-shadow(0 0 22px rgba(182,141,77,.5)); }
.celebrate-card h2 { font-size: 1.3rem; margin: 6px 0 2px; }
.celebrate-card button { width: 100%; margin-top: 12px; }
@keyframes medalIn { from { opacity: 0; transform: scale(.4) rotate(-25deg); } }
@keyframes fadeIn { from { opacity: 0; } }
.sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 18px; }
.sparks i { position: absolute; left: 50%; top: 34%; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); opacity: 0;
  animation: spark 1.4s ease-out calc(var(--k) * 40ms) 2; transform-origin: 0 0; }
@keyframes spark { 0% { opacity: 1; transform: rotate(calc(var(--k) * 25.7deg)) translateX(0); } 100% { opacity: 0; transform: rotate(calc(var(--k) * 25.7deg)) translateX(150px); } }

/* hero login / signup */
.hero-wrap { padding: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); place-items: center; background: transparent; }
.hero { position: relative; align-self: stretch; justify-self: stretch; overflow: hidden; background: #161617; min-height: 100vh; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 45% 30%, rgba(216,183,124,.18), transparent 55%),
  linear-gradient(90deg, transparent 55%, var(--bg) 99%), linear-gradient(0deg, rgba(22,22,23,.92), transparent 45%); animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .85; } to { opacity: 1; } }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; padding: 0 20px; }
.hero-title { font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: .12em; text-transform: uppercase;
  background: var(--leaf); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 8px rgba(0,0,0,.8)); }
.hero-sub { color: var(--cream); margin-top: 6px; text-shadow: 0 1px 6px #000; }
.hero-wrap > .card { margin: 32px 20px; width: min(440px, calc(100% - 40px)); }
.hero-wrap > .card.join { width: min(540px, calc(100% - 40px)); }
.login .brand img { width: 76px; height: 76px; }
.login .brand b { font-size: 1.15rem; }
@media (max-width: 820px) {
  .hero-wrap { grid-template-columns: minmax(0, 1fr); place-items: start center; }
  .hero { min-height: 0; height: 44vh; max-height: 380px; width: 100%; }
  .hero img { object-position: 50% 18%; }
  .hero-glow { background: radial-gradient(ellipse at 45% 30%, rgba(216,183,124,.16), transparent 60%), linear-gradient(0deg, var(--bg) 4%, transparent 60%); }
  .hero-copy { bottom: 16%; } .hero-sub { font-size: .9rem; }
  .hero-wrap > .card { margin: -48px 12px 28px; width: calc(100% - 24px); position: relative; z-index: 2; }
  .hero-wrap > .card.join { width: calc(100% - 24px); }
  .login .brand { margin-bottom: 14px; } .login .brand img { width: 60px; height: 60px; }
  .colonnade { height: 26px; }
  .main > h1::after { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .spinner::before { animation: none !important; }
  .sparks { display: none; }
}
