/* ============================================================
   Starbound Publishing — Design Tokens
   Colors + Type foundations, extracted from the production site.
   Fonts: Fraunces (serif display) + Inter (sans body) via Google Fonts.
   Import this file, then use the CSS vars below.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap');

:root {
  /* ---------- BACKGROUNDS / SURFACES ---------- */
  --bg:        #ffffff;   /* page base, cards on tinted sections */
  --bg-soft:   #f7f6f3;   /* soft neutral panel / card fill      */
  --bg-cream:  #faf8f3;   /* warm cream section bands             */

  /* ---------- INK / TEXT ---------- */
  --ink:        #14141b;  /* primary text, dark UI fills          */
  --ink-soft:   #4a4a55;  /* body copy, secondary text            */
  --ink-muted:  #5a5a65;  /* meta, captions, labels               */

  /* ---------- LINES ---------- */
  --line:      #e8e6e0;   /* hairline borders, dividers           */

  /* ---------- BRAND VIOLET (accent) ---------- */
  --accent:       #6d4ed8; /* primary brand violet (links, hover) */
  --accent-soft:  #f1edff; /* tinted violet pill / chip fill      */
  --accent-deep:  #2e1d72; /* deep violet (logo, on-light text)   */
  --accent-light: #9b87ff; /* light violet (gradient stop, stars) */

  /* ---------- SECONDARY ACCENTS ---------- */
  --gold:           #b8924a; /* occasional warm metallic accent   */
  --cookbook-accent:#ea580c; /* No Stress Cookbook series (orange)*/
  --leader-accent:  #475569; /* Essential Leader Toolkit (slate)  */

  /* ---------- SERIES / CATEGORY GRADIENTS ---------- */
  --grad-cookbook: linear-gradient(135deg, #7c2d12, #ea580c); /* warm orange */
  --grad-baking:   linear-gradient(135deg, #92400e, #d97706); /* honey       */
  --grad-romantic: linear-gradient(135deg, #9f1239, #e11d48); /* rose        */
  --grad-holiday:  linear-gradient(135deg, #14532d, #16a34a); /* forest      */
  --grad-leader:   linear-gradient(135deg, #0f172a, #334155); /* deep navy   */
  --grad-house:    linear-gradient(135deg, #2e1d72, #6d4ed8); /* brand violet*/
  /* Hero / "night sky" brand gradient (3-stop diagonal) */
  --grad-night:    linear-gradient(140deg, #2e1d72 0%, #6d4ed8 50%, #9b87ff 100%);

  /* ---------- RADII ---------- */
  --radius-sm:   6px;   /* book covers, inputs                    */
  --radius:      14px;  /* default cards, buttons (rect)          */
  --radius-lg:   22px;  /* large feature cards                    */
  --radius-xl:   28px;  /* dark CTA blocks                        */
  --radius-pill: 999px; /* buttons, chips, eyebrows               */

  /* ---------- SHADOWS ---------- */
  --shadow-sm: 0 1px 2px rgba(20,20,27,0.04), 0 2px 8px rgba(20,20,27,0.04);
  --shadow-md: 0 6px 20px rgba(20,20,27,0.08), 0 2px 6px rgba(20,20,27,0.04);
  --shadow-lg: 0 20px 60px rgba(20,20,27,0.12), 0 6px 16px rgba(20,20,27,0.06);

  /* ---------- SPACING SCALE ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-section: 96px;   /* vertical section rhythm (desktop)   */
  --container: 1200px;     /* max content width                   */
  --container-pad: 24px;   /* gutter                              */

  /* ---------- TYPE FAMILIES ---------- */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;  /* display */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; /* body / UI */

  /* ---------- FLUID TYPE SCALE ---------- */
  --fs-display: clamp(40px, 5.5vw, 68px); /* hero H1            */
  --fs-h1:      clamp(40px, 5vw, 64px);   /* page / series H1   */
  --fs-h2:      clamp(32px, 4vw, 44px);   /* section titles     */
  --fs-h3:      26px;                      /* card / series headings */
  --fs-h4:      18px;                      /* small headings     */
  --fs-lead:    18px;                      /* hero subhead       */
  --fs-body:    16px;                      /* default body       */
  --fs-small:   14px;                      /* meta / UI          */
  --fs-eyebrow: 13px;                      /* pill labels        */
  --fs-label:   12px;                      /* uppercase labels   */
}

/* ============================================================
   SEMANTIC ELEMENT STYLES
   Apply via the classes below, or copy into your own rules.
   ============================================================ */

.sb-serif { font-family: var(--font-serif); }
.sb-sans  { font-family: var(--font-sans); }

/* Display & headings — Fraunces, weight 500, tight tracking */
.sb-display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sb-display em { font-style: italic; font-weight: 400; color: var(--accent); }

.sb-h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sb-h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sb-h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sb-h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-h4);
  color: var(--ink);
}

/* Body — Inter, line-height 1.6 */
.sb-lead { font-family: var(--font-sans); font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-soft); }
.sb-body { font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.6; color: var(--ink-soft); }
.sb-small { font-family: var(--font-sans); font-size: var(--fs-small); color: var(--ink-muted); }

/* Eyebrow pill — tinted violet chip with leading dot */
.sb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
}

/* Section label — uppercase, wide tracking, violet (or accent color) */
.sb-section-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* Small caps "kicker" used over dark / image backgrounds */
.sb-kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ============================================================
   BRAND LOCKUP — nav/footer mark + wordmark.
   Emblem (logo-emblem.png) + "Starbound" navy serif over
   "PUBLISHING" violet letter-spaced caps, echoing logo.png.
   ============================================================ */
.brand-logo { height: 34px; width: auto; display: block; flex-shrink: 0; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--accent-deep);
}
.brand-pub {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 3px;
}
/* On dark surfaces (e.g. footer), wordmark goes light */
.brand--on-dark .brand-name { color: #ffffff; }
.brand--on-dark .brand-pub { color: var(--accent-light, #9b87ff); }

/* ============================================================
   COMMUNITY — "framed window" hero + article hub.
   Themeable via --series / --series-deep / --hero-grad (set per page).
   ============================================================ */
.hero-window {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.hero-window .hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: var(--hero-grad, linear-gradient(135deg, #2e1d72, #6d4ed8));
  background-size: cover; background-position: center;
}
/* The generated photo sits in front of the gradient; if it 404s it's hidden and the gradient shows. */
.hero-window .hero-photo {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.hero-window .hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(12,10,20,0.78) 0%, rgba(12,10,20,0.5) 48%, rgba(12,10,20,0.12) 100%);
}
@media (max-width: 700px) {
  .hero-window .hero-scrim { background: linear-gradient(180deg, rgba(12,10,20,0.35) 0%, rgba(12,10,20,0.82) 100%); }
}
.hero-glass {
  max-width: 520px;
  margin: 36px 0;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 600px) { .hero-glass { padding: 24px; margin: 24px 0; } }
.hero-glass .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700;
  color: #fff; margin-bottom: 16px;
}
.hero-glass .kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-light, #9b87ff); }
.hero-glass .hero-meta { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.78); margin-bottom: 8px; }
.hero-glass h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(24px, 3vw, 33px); line-height: 1.12; letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero-glass p { font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.hero-read {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ink);
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; border: none; cursor: pointer; font-family: inherit;
  transition: background .2s, transform .15s, color .2s;
}
.hero-read:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.hero-read .arrow { transition: transform .2s; }
.hero-read:hover .arrow { transform: translateX(3px); }

/* Article hub: featured cards + filterable library */
.article-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 36px; }
@media (max-width: 720px) { .article-featured { grid-template-columns: 1fr; } }
.article.is-card .article-head { align-items: flex-start; }
.article.is-card .excerpt { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 10px; }

.lib-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lib-title { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover { border-color: var(--series); color: var(--ink); }
.filter-chip.active { background: var(--series); color: #fff; border-color: var(--series); }

/* Disclaimer block on the join form */
.join-disclaimer {
  background: var(--series-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px; color: var(--ink-soft);
  margin-bottom: 18px;
}
.join-disclaimer strong { color: var(--ink); }
.fineprint { font-size: 12px; color: var(--ink-muted); margin-top: 12px; }
