/* ═══════════════════════════════════════════════════════════════════════
   HUB THEME  —  shared "Choose Your Own" look (light / high-clarity)
   ───────────────────────────────────────────────────────────────────────
   Black text on a white background for maximum readability, with gold
   (Workspace) and teal (Learn) kept only as accents — coloured top bars,
   icon tiles and hover states — so the card families stay distinct.
   Playfair Display for headings, Cormorant Garamond for body text.

   Used by: index.html and the workspace pages
   (journal, tailored-practice, paper-submissions, memorisation).
       <link rel="stylesheet" href="assets/css/hub.css">
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand accents (tuned to be legible on white) */
  --gold: #c19a26;
  --gold-bright: #8a6d12;          /* readable gold for small accent text */
  --gold-glow: rgba(193, 154, 38, 0.25);
  --ruby: #c0392b;
  --emerald: #1e8a5a;
  --emerald-bright: #157a4a;

  /* Surfaces & text (light) */
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-inner: #f5f5f1;
  --text: #20242c;                 /* body — near-black */
  --text-dim: #55606f;
  --text-dimmer: #8a93a0;
  --ink: #14171d;                  /* headings — black */
  --border: rgba(20, 23, 29, 0.14);
  --border-strong: rgba(20, 23, 29, 0.24);
  --shadow: 0 6px 22px rgba(20, 23, 29, 0.08);
  --shadow-hover: 0 16px 38px rgba(20, 23, 29, 0.16);

  /* Legacy "dark" names remapped to light surfaces, so page inline styles
     (inputs, card faces, etc.) that reference them stay light automatically. */
  --midnight: #ffffff;
  --midnight-deep: #ffffff;
  --night-blue: #f4f6fa;
  --indigo: #eef1f7;

  /* Card accent — defaults to gold (Workspace). Override with .accent-learn. */
  --ca: #c19a26;
  --ca-bright: #8a6d12;
  --ca-soft: rgba(193, 154, 38, 0.14);
  --ca-icon1: #fbf2d3;
  --ca-icon2: #f3e3ad;
}

/* Accent palettes for card groups */
.accent-workspace {
  --ca: #c19a26;
  --ca-bright: #8a6d12;
  --ca-soft: rgba(193, 154, 38, 0.14);
  --ca-icon1: #fbf2d3;
  --ca-icon2: #f3e3ad;
}
.accent-learn {
  --ca: #2b93a6;
  --ca-bright: #0e6675;
  --ca-soft: rgba(43, 147, 166, 0.14);
  --ca-icon1: #dbf1f5;
  --ca-icon2: #bfe6ec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem;
  overflow-x: hidden;
}

.hub-shell { max-width: 1200px; margin: 0 auto; position: relative; z-index: 10; }

/* ─────────────────────────  TOP BAR  ───────────────────────── */
.hub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.hub-brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; }
.hub-logo {
  width: 52px; height: 52px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, #fbf2d3, #f3e3ad);
  border: 1px solid var(--border-strong);
}
.hub-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.hub-topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Identity chip + small round buttons */
.hub-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.45rem;
  background: var(--panel-inner);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}
.hub-chip-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; overflow: hidden;
  background: linear-gradient(135deg, #fbf2d3, #f3e3ad);
  border: 2px solid var(--gold);
}
.hub-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hub-chip-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); line-height: 1.1; }
.hub-chip-sub { font-size: 0.78rem; color: var(--text-dim); }

.hub-iconbtn {
  width: 44px; height: 44px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; cursor: pointer;
  background: var(--panel-inner);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.25s;
}
.hub-iconbtn:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.hub-lang { width: auto; padding: 0 0.95rem; gap: 0.4rem; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 0.8rem; color: var(--ink); }

/* ─────────────────────────  HERO  ───────────────────────── */
.hub-hero { text-align: center; padding: 1.5rem 1rem 2rem; }
.hub-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  letter-spacing: 0.5px;
}
.hub-hero p { color: var(--text-dim); font-size: 1.2rem; margin-top: 0.6rem; font-style: italic; }

/* ─────────────────────────  SECTION HEADING  ───────────────────────── */
.hub-section { margin-bottom: 2.5rem; position: relative; z-index: 10; }
.hub-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0.3px;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hub-section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* ─────────────────────────  CARD GRID  ───────────────────────── */
.hub-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--ca);
  border-radius: 16px;
  padding: 1.6rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.hub-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--ca-soft), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.hub-card:hover { transform: translateY(-6px); border-color: var(--ca); border-top-color: var(--ca); box-shadow: var(--shadow-hover); }
.hub-card:hover::before { opacity: 1; }
.hub-card-icon {
  width: 60px; height: 60px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--ca-icon1), var(--ca-icon2));
  border: 1px solid color-mix(in srgb, var(--ca) 45%, transparent);
}
.hub-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.hub-card-desc { color: var(--text-dim); font-size: 1.02rem; line-height: 1.55; }
.hub-card-tag {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.62rem; letter-spacing: 1.5px; text-transform: none;
  color: var(--ca-bright);
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--ca-soft); border: 1px solid color-mix(in srgb, var(--ca) 40%, transparent);
}
.hub-card.soon .hub-card-tag { color: var(--ruby); border-color: rgba(192,57,43,0.4); background: rgba(192,57,43,0.08); }

/* Smaller "tool/demo" chips for retained sub-pages */
.hub-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hub-tool {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  padding: 0.6rem 1.05rem;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem; font-weight: 600;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.hub-tool:hover { border-color: var(--gold); background: #fffdf5; transform: translateY(-2px); }
.hub-tool .ico { font-size: 1.1rem; }

/* ─────────────────────────  PAGE CONTENT (workspace pages)  ───────────────────────── */
.hub-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.hub-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none;
  color: var(--text-dim);
  font-family: 'Playfair Display', serif;
  font-size: 0.72rem; text-transform: none; letter-spacing: 1.5px; font-weight: 700;
  padding: 0.5rem 0.9rem; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: all 0.25s;
  margin-bottom: 1.25rem;
}
.hub-back:hover { color: var(--ink); border-color: var(--gold); }

.hub-page-head { text-align: center; margin-bottom: 1.75rem; }
.hub-page-head .ico { font-size: 3rem; }
.hub-page-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--ink);
  margin-top: 0.5rem;
}
.hub-page-head p { color: var(--text-dim); font-size: 1.15rem; margin-top: 0.5rem; font-style: italic; }

.hub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700; text-transform: none; letter-spacing: 1.2px; font-size: 0.8rem;
  padding: 0.8rem 1.4rem; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #d4af37, #b8941f);
  color: #2a2207; border: 1px solid #b8941f;
  transition: all 0.25s; text-decoration: none;
}
.hub-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--gold-glow); }
.hub-btn.ghost { background: var(--panel); color: var(--gold-bright); border: 1px solid var(--border-strong); }
.hub-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.hub-empty {
  text-align: center; padding: 2.5rem 1.5rem;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: var(--panel-inner);
}
.hub-empty .ico { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.8; }

@media (max-width: 768px) {
  body { padding: 1rem; }
  .hub-topbar { padding: 0.9rem 1.1rem; }
  .hub-brand-name { font-size: 1.15rem; }
  .hub-chip-sub { display: none; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-panel { padding: 1.25rem; }
}

/* ─────────────────────────  LESSON BLUEPRINT SCAFFOLDS  ───────────────────────── */
.cw-note {
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: var(--ca-soft); border: 1px solid color-mix(in srgb, var(--ca) 35%, transparent);
  border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 1.25rem;
  color: var(--text-dim); font-size: 0.98rem;
}
.cw-book-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--ink); }
.cw-book-meta { color: var(--text-dim); font-style: italic; margin: 0.2rem 0 0.85rem; }
.cw-synopsis { font-size: 1.1rem; line-height: 1.7; color: var(--text); }
.cw-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.cw-list li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 1.06rem; color: var(--text); line-height: 1.5; }
.cw-list li::before { content: '✶'; color: var(--gold-bright); flex: 0 0 auto; }
.cw-terms { display: grid; gap: 0.8rem; }
.cw-term { background: var(--panel-inner); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 10px; padding: 0.9rem 1.1rem; }
.cw-term .t { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--gold-bright); font-size: 1.05rem; }
.cw-term .d { color: var(--text-dim); margin-top: 0.2rem; line-height: 1.55; }
.cw-acro { list-style: none; margin-top: 0.5rem; display: grid; gap: 0.3rem; }
.cw-acro li { display: flex; gap: 0.6rem; align-items: baseline; color: var(--text-dim); }
.cw-acro .l { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--gold-bright); min-width: 1.5rem; }
