/* Shared styles for Enigma blog pages */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&display=swap');

:root {
  --gold: #d4af37;
  --gold-dim: #a8893a;
  --indigo: #2b2350;
  --text: #f2ecdf;
  --text-dim: #a89f8c;
  --glass-bg: rgba(255,255,255,.05);
  --glass-border: rgba(212,175,55,.22);
  --serif: "Fraunces", Georgia, serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  /* Matches the iOS app's dark mystical background. */
  background:
    radial-gradient(circle 460px at 88% -4%, rgba(212,175,55,.08), transparent 70%),
    linear-gradient(160deg, #120e24 0%, #0b0913 55%, #0e0a1a 100%) #0b0913;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.7;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav { position: sticky; top: 16px; z-index: 10; max-width: 1000px; margin: 16px auto 0; padding: 0 24px; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-radius: 999px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.nav-inner .logo { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: 3px;
                   color: var(--gold); text-decoration: none; }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* Blog index */
.blog-hero { text-align: center; padding: 64px 0 40px; }
.blog-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 48px); font-weight: 600; letter-spacing: 0;
  background: linear-gradient(90deg, #f2ecdf, var(--gold), #cdb8ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.blog-hero p { color: var(--text-dim); margin-top: 12px; font-size: 18px; max-width: 560px; margin-left: auto; margin-right: auto; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding-bottom: 80px; }
.post-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px; border-radius: 24px; text-decoration: none;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.post-card .emoji { font-size: 34px; }
.post-card h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.35; }
.post-card p { color: var(--text-dim); font-size: 15px; }
.post-meta { font-size: 13px; color: var(--text-dim); opacity: .8; }
.post-card .read-more { color: var(--gold); font-size: 14px; font-weight: 700; margin-top: auto; }

/* Article */
article { padding: 56px 0 40px; }
article .meta { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
article h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 42px); font-weight: 600;
             letter-spacing: 0; line-height: 1.2; margin-bottom: 18px; }
article .lead { font-size: 19px; color: var(--text-dim); margin-bottom: 32px; }
article h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 40px 0 14px; }
article h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
article p { margin-bottom: 16px; color: #e0d9c8; }
article ul, article ol { margin: 0 0 16px 24px; color: #e0d9c8; }
article li { margin-bottom: 8px; }
article a { color: var(--gold); text-decoration: none; }
article a:hover { text-decoration: underline; }
article strong { color: var(--text); }
article em { font-family: var(--serif); }
article blockquote {
  margin: 0 0 16px; padding: 14px 20px; border-left: 2px solid var(--gold);
  background: rgba(212,175,55,.05); border-radius: 0 12px 12px 0;
  font-family: var(--serif); font-style: italic; color: var(--text);
}

/* CTA box */
.cta-box {
  margin: 44px 0; padding: 28px; border-radius: 24px; text-align: center;
  background: var(--glass-bg); border: 1px solid rgba(212,175,55,.35);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.cta-box .emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.cta-box h3 { font-family: var(--serif); margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.cta-box p { color: var(--text-dim); margin-bottom: 16px; }
.cta-box .badge {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 12px 24px;
  font-size: 15px; font-weight: 700; color: var(--text);
  background: rgba(212,175,55,.10); border: 1px solid rgba(212,175,55,.4);
}
.cta-box .badge span { color: var(--gold); }

/* Footer */
footer {
  border-top: 1px solid rgba(212,175,55,.15);
  text-align: center; padding: 32px 24px 48px;
  font-size: 14px; color: var(--text-dim);
}
footer a { color: var(--text); text-decoration: none; margin: 0 10px; }
footer a:hover { text-decoration: underline; }
footer .links { margin-bottom: 16px; }

@media (max-width: 560px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 13px; }
}

/* Social button */
.social-btn {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; padding: 10px 20px;
  border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--text); text-decoration: none;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(212,175,55,.3);
  backdrop-filter: blur(10px);
  transition: background .25s ease, transform .25s ease;
}
.social-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); text-decoration: none; }
.social-btn svg { width: 17px; height: 17px; fill: currentColor; }
