/* =====================================================================
   Finding Your Marbles — public site styles
   Design concept: glass marbles — clarity, swirl, light through glass.
   ===================================================================== */

:root {
  /* Color */
  --ink: #1C2333;
  --ink-soft: #3C4557;
  --paper: #FAF7F1;
  --paper-dim: #F0EBE0;
  --amber: #E3A857;
  --blue: #4C7A96;
  --rose: #C97B86;
  --line: rgba(28, 35, 51, 0.12);
  --line-light: rgba(250, 247, 241, 0.16);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-width: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.8em;
}

.text-muted { color: var(--ink-soft); }

/* ---- Marble motif ---------------------------------------------------- */
.marble {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  box-shadow: inset -2px -3px 4px rgba(0,0,0,0.25), inset 2px 2px 3px rgba(255,255,255,0.5);
}
.marble--sm { width: 9px; height: 9px; }
.marble--amber { background: radial-gradient(circle at 32% 28%, #FCE3B3, var(--amber) 55%, #A8752C 100%); }
.marble--blue  { background: radial-gradient(circle at 32% 28%, #C7DEE8, var(--blue) 55%, #2C4C5C 100%); }
.marble--rose  { background: radial-gradient(circle at 32% 28%, #F0D2D6, var(--rose) 55%, #8B4650 100%); }
.marble-cluster { display: inline-flex; align-items: center; gap: -4px; }
.marble-cluster .marble + .marble { margin-left: -5px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #101623; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  background: var(--ink);
  color: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.site-brand-text { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--paper); display: block; }

.nav-list { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--paper); opacity: 0.9; }
.nav-item > a:hover { opacity: 1; }
.nav-item.has-children:hover .nav-submenu { display: block; }
.nav-submenu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--ink); list-style: none; padding: 10px 0; margin: 8px 0 0;
  min-width: 180px; border-radius: 10px; box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}
.nav-submenu a { display: block; padding: 8px 18px; text-decoration: none; color: var(--paper); font-size: 0.9rem; }
.nav-submenu a:hover { background: rgba(255,255,255,0.06); }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 96px 24px 110px;
  position: relative; z-index: 2;
  max-width: 640px;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0.3em; }
.hero-subtitle { font-size: 1.15rem; color: rgba(250,247,241,0.78); max-width: 480px; margin-bottom: 2em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-outline { border-color: rgba(250,247,241,0.5); color: var(--paper); }
.hero .btn-outline:hover { background: var(--paper); color: var(--ink); }
.hero .btn-primary { background: var(--amber); color: var(--ink); }
.hero .btn-primary:hover { background: #F0BC7C; }

.hero-glass { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(2px);
  opacity: 0.85;
}
.hero-orb--1 { width: 260px; height: 260px; right: -60px; top: -40px; background: radial-gradient(circle at 35% 30%, rgba(227,168,87,0.55), rgba(227,168,87,0.05) 70%); }
.hero-orb--2 { width: 180px; height: 180px; right: 220px; bottom: -70px; background: radial-gradient(circle at 35% 30%, rgba(76,122,150,0.5), rgba(76,122,150,0.05) 70%); }
.hero-orb--3 { width: 120px; height: 120px; right: 60px; bottom: 60px; background: radial-gradient(circle at 35% 30%, rgba(201,123,134,0.5), rgba(201,123,134,0.05) 70%); }

/* ---- Page hero (blog/podcasts index) --------------------------------------- */
.page-hero { background: var(--paper-dim); border-bottom: 1px solid var(--line); }
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; padding: 64px 24px 48px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); max-width: 640px; }

/* ---- Sections -------------------------------------------------------------- */
.section { padding: 72px 0; }
.section--tinted { background: var(--paper-dim); }
.section-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; gap: 16px; flex-wrap: wrap; }
.section-heading h2 { font-size: 1.8rem; }
.section-link { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--blue); white-space: nowrap; }

/* ---- Cards ------------------------------------------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(28,35,51,0.1); }
.card-media { aspect-ratio: 16/10; background-size: cover; background-position: center; background-color: var(--paper-dim); }
.card-media--placeholder { display: flex; align-items: center; justify-content: center; }
.card-media--placeholder .marble { width: 40px; height: 40px; }
.card-body { padding: 20px 22px 24px; }
.card-date { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; margin: 0 0 8px; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card-body p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* ---- Blog toolbar / filters -------------------------------------------------- */
.blog-toolbar { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.search-form--public { display: flex; gap: 10px; max-width: 360px; }
.search-form--public input {
  flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-body); font-size: 0.9rem;
}
.category-filter { display: flex; gap: 10px; flex-wrap: wrap; }
.category-filter a {
  text-decoration: none; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.85rem; color: var(--ink-soft);
}
.category-filter a.is-active, .category-filter a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- Single article / podcast / page ---------------------------------------- */
.single-header { background: var(--paper-dim); border-bottom: 1px solid var(--line); }
.single-header-inner { max-width: 760px; margin: 0 auto; padding: 56px 24px 44px; }
.single-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.single-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.single-featured-image {
  max-width: var(--max-width); margin: -1px auto 0;
  aspect-ratio: 21/9; background-size: cover; background-position: center;
}

.single-body { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

.prose { font-size: 1.05rem; }
.prose p { margin: 0 0 1.4em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--amber);
  font-style: italic; color: var(--ink-soft);
}
.prose a { color: var(--blue); text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; }

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.tag {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  background: var(--paper-dim); border-radius: 999px; padding: 5px 12px; color: var(--ink-soft);
}

/* ---- Podcast player -------------------------------------------------------- */
.podcast-player-wrap {
  max-width: 760px; margin: 40px auto 0; padding: 0 24px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.podcast-cover { width: 160px; height: 160px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; }
.podcast-player { flex: 1; min-width: 240px; }

/* ---- Pagination -------------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; text-decoration: none; color: var(--ink-soft); border: 1px solid var(--line);
  font-size: 0.85rem;
}
.pagination a.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- Footer -------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 40px; }
.site-footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 56px 24px 32px;
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-brand p { color: rgba(250,247,241,0.7); font-size: 0.9rem; margin-top: 14px; }
.footer-nav-list { list-style: none; display: flex; gap: 22px; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-nav-list a { text-decoration: none; color: rgba(250,247,241,0.85); font-size: 0.9rem; }
.footer-social { display: flex; gap: 16px; flex-wrap: wrap; align-self: flex-start; }
.footer-social a { text-decoration: none; color: rgba(250,247,241,0.85); font-size: 0.9rem; }
.site-footer-bottom {
  border-top: 1px solid var(--line-light);
  padding: 20px 24px; text-align: center;
  font-size: 0.8rem; color: rgba(250,247,241,0.55);
}

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); display: none; padding: 12px 24px 24px;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 4px; }
  .nav-item > a { display: block; padding: 10px 0; }
  .nav-submenu { position: static; box-shadow: none; margin: 0 0 0 12px; }
  .single-featured-image { aspect-ratio: 4/3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
}
