/* ==========================================================================
   Soulfire Alchemy — Blog + Navigation stylesheet
   --------------------------------------------------------------------------
   Built to match the live "Moonlit Navy" system already on your homepage:
   same palette variables, same background gradients, same card and button
   treatment, same 880px wrap.

   Every class is prefixed .sfa- so adding this file to index.html cannot
   change a single existing element on your homepage.
   ========================================================================== */

:root {
  /* Same tokens as your homepage. Re-declared so blog pages work standalone.
     If you ever change a color on the homepage, change it here too.        */
  --midnight-ink:     #03070B;
  --deep-midnight:    #06121A;
  --layered-navy:     #0B1F2A;
  --blue-charcoal:    #102B35;
  --aetheric-azure:   #1796AC;
  --azure-light:      #5CCAD0;
  --cosmic-teal:      #008C81;
  --moonstone-light:  #F5F5F7;
  --soft-moonstone:   #E5E3E0;
  --celestial-silver: #A9A9A9;
  --alchemical-gold:  #C7A35A;

  /* ---- Soulfire Alchemy typography system (standardized) ---- */
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-heading: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  /* backward-compatible aliases */
  --serif: var(--font-display);
  --heading: var(--font-heading);
  --sans: var(--font-body);
  --sfa-serif: var(--font-heading);
  --sfa-sans: var(--font-body);

  --sfa-wrap: 880px;      /* matches .wrap on the homepage */
  --sfa-read: 660px;      /* comfortable article reading measure */
  --sfa-rule: rgba(169, 169, 169, 0.18);  /* matches homepage borders */
}

/* ==========================================================================
   1. NAVIGATION  (used on every page, including the homepage)
   ========================================================================== */

.sfa-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(6, 18, 26, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sfa-rule);
}

.sfa-nav__inner {
  max-width: var(--sfa-wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sfa-nav__brand {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--celestial-silver);
  text-decoration: none;
  white-space: nowrap;
}

.sfa-nav__brand:hover { color: var(--azure-light); }

.sfa-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sfa-nav__link {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--soft-moonstone);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}

.sfa-nav__link:hover,
.sfa-nav__link:focus-visible { color: var(--azure-light); border-bottom-color: var(--azure-light); }

.sfa-nav__link--active { color: var(--azure-light); border-bottom-color: var(--azure-light); }

.sfa-nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--sfa-rule);
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
  line-height: 0;
}

.sfa-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--soft-moonstone);
  transition: transform .2s, opacity .15s;
}

.sfa-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sfa-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sfa-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .sfa-nav__toggle { display: block; }

  .sfa-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--layered-navy);
    border-bottom: 1px solid var(--sfa-rule);
    padding: 4px 0 10px;
    display: none;
  }

  .sfa-nav__links.is-open { display: flex; }
  .sfa-nav__links li { width: 100%; }

  .sfa-nav__link {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(169, 169, 169, 0.12);
  }

  .sfa-nav__link:hover { border-bottom-color: rgba(169, 169, 169, 0.12); }
}

/* ==========================================================================
   2. BLOG PAGE SHELL  (blog pages only — homepage keeps its own body rules)
   ========================================================================== */

.sfa-page {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--soft-moonstone);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(23,150,172,0.10), transparent 60%),
    radial-gradient(ellipse 700px 400px at 90% 100%, rgba(0,140,129,0.07), transparent 55%),
    linear-gradient(180deg, var(--deep-midnight) 0%, var(--midnight-ink) 100%);
  background-attachment: fixed;
}

.sfa-page * { box-sizing: border-box; }

/* Prevent long words/URLs from overflowing cards, buttons, or mobile screens */
.sfa-page, .sfa-card, .sfa-btn, .sfa-article { overflow-wrap: break-word; word-wrap: break-word; }

.sfa-wrap { max-width: var(--sfa-wrap); margin: 0 auto; padding: 0 24px; }
.sfa-read { max-width: var(--sfa-read); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   3. PAGE HEADER  (mirrors the homepage <header> block)
   ========================================================================== */

.sfa-header {
  background: linear-gradient(135deg, var(--layered-navy) 0%, var(--blue-charcoal) 100%);
  color: var(--moonstone-light);
  padding: 56px 24px 48px;
  text-align: center;
}

.sfa-eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--celestial-silver);
  margin: 0 0 10px;
}

.sfa-h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--moonstone-light);
}

.sfa-lede {
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
  color: var(--soft-moonstone);
}

.sfa-meta {
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--celestial-silver);
  margin: 22px 0 0;
}

.sfa-meta span + span::before { content: "·"; margin: 0 10px; opacity: .6; }

/* ==========================================================================
   4. ARTICLE BODY
   ========================================================================== */

.sfa-article { padding: 44px 0 8px; font-size: 17px; line-height: 1.72; }

.sfa-article p { margin: 0 0 20px; }

.sfa-article h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--moonstone-light);
  margin: 44px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--sfa-rule);
}

.sfa-article h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--azure-light);
  margin: 32px 0 12px;
}

.sfa-article strong { color: var(--moonstone-light); font-weight: 700; }

.sfa-article a { color: var(--aetheric-azure); text-decoration: underline; text-underline-offset: 3px; }
.sfa-article a:hover { color: var(--azure-light); }

.sfa-article ul,
.sfa-article ol { margin: 0 0 22px; padding-left: 22px; }
.sfa-article li { margin-bottom: 10px; }
.sfa-article li::marker { color: var(--aetheric-azure); }

.sfa-article blockquote {
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 1.55;
  color: var(--moonstone-light);
  background: var(--blue-charcoal);
  border-left: 3px solid var(--aetheric-azure);
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  padding: 16px 20px;
}

.sfa-article blockquote p { margin: 0; }

.sfa-pull {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--moonstone-light);
  border-left: 3px solid var(--cosmic-teal);
  padding: 4px 0 4px 20px;
  margin: 34px 0;
}

.sfa-practice {
  background: var(--blue-charcoal);
  border: 1px solid var(--sfa-rule);
  border-radius: 10px;
  padding: 24px 22px;
  margin: 34px 0;
}

.sfa-practice h4 {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aetheric-azure);
  margin: 0 0 14px;
}

.sfa-practice p:last-child,
.sfa-practice ul:last-child { margin-bottom: 0; }

/* ==========================================================================
   5. CARDS  (blog index + "From the Blog" on the homepage)
   Matches .card / .grid on the homepage.
   ========================================================================== */

.sfa-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sfa-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--blue-charcoal);
  border: 1px solid var(--sfa-rule);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--soft-moonstone);
  transition: border-color .15s;
}

.sfa-card:hover,
.sfa-card:focus-visible { border-color: var(--cosmic-teal); }

.sfa-card__tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aetheric-azure);
  margin: 0 0 8px;
}

.sfa-card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--azure-light);
  margin: 0 0 8px;
}

.sfa-card__desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--soft-moonstone);
  opacity: .85;
  margin: 0 0 16px;
  flex-grow: 1;
}

.sfa-card__link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--cosmic-teal);
  margin: 0;
}

.sfa-card:hover .sfa-card__link { color: var(--azure-light); }

/* ==========================================================================
   6. "FROM THE BLOG" HOMEPAGE SECTION
   Sits inside .wrap, so it inherits the homepage's section padding + rule.
   ========================================================================== */

.sfa-blog-section h2 {
  font-family: var(--font-display);
  color: var(--moonstone-light);
  font-size: 28px;
  margin: 0 0 18px;
}

.sfa-blog-section > p { font-size: 16.5px; margin: 0 0 24px; }

.sfa-section-foot { margin-top: 22px; }

/* ==========================================================================
   7. BUTTONS + CTA BLOCK   (matches .btn on the homepage)
   ========================================================================== */

.sfa-btn {
  display: inline-block;
  background: var(--cosmic-teal);
  color: var(--midnight-ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 8px;
  margin-top: 12px;
  transition: background .15s, border-color .15s;
}

.sfa-btn:hover,
.sfa-btn:focus-visible { background: var(--aetheric-azure); }

.sfa-btn--ghost {
  background: transparent;
  border: 1px solid var(--sfa-rule);
  color: var(--soft-moonstone);
}

.sfa-btn--ghost:hover { background: transparent; border-color: var(--cosmic-teal); color: var(--azure-light); }

.sfa-cta {
  background: linear-gradient(135deg, var(--layered-navy) 0%, var(--blue-charcoal) 100%);
  border: 1px solid var(--sfa-rule);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  margin: 48px 0 8px;
}

.sfa-cta__eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aetheric-azure);
  margin: 0 0 12px;
}

.sfa-cta h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--moonstone-light);
  margin: 0 0 12px;
  border: 0;
  padding: 0;
}

.sfa-cta p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--soft-moonstone);
  max-width: 480px;
  margin: 0 auto;
}

.sfa-cta__note {
  font-size: 13px;
  color: var(--celestial-silver);
  margin: 16px auto 0 !important;
}

/* ==========================================================================
   8. POST FOOTER NAV + BLOG FOOTER
   ========================================================================== */

.sfa-postnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 8px;
}

.sfa-footer {
  text-align: center;
  padding: 44px 24px 60px;
  color: var(--celestial-silver);
  font-size: 13px;
}

.sfa-footer a { color: var(--aetheric-azure); text-decoration: none; }
.sfa-footer a:hover { color: var(--azure-light); }

.sfa-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

/* ==========================================================================
   9. ACCESSIBILITY + MOTION
   ========================================================================== */

.sfa-skip { position: absolute; left: -9999px; }
.sfa-skip:focus {
  left: 16px; top: 8px; z-index: 1000;
  background: var(--cosmic-teal); color: var(--midnight-ink);
  padding: 10px 16px; border-radius: 8px;
}

a:focus-visible,
button:focus-visible { outline: 2px solid var(--azure-light); outline-offset: 3px; }

html { scroll-behavior: smooth; }
:target { scroll-margin-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 600px) {
  .sfa-header { padding: 40px 20px 34px; }
  .sfa-cta { padding: 26px 20px; }
  .sfa-article { padding-top: 34px; }
  .sfa-pull { font-size: 20px; }
}

/* ==========================================================================
   10. FIGURE + LIGHTBOX
   Uses the same card border, radius, and rule color as the rest of the site.
   ========================================================================== */

.sfa-figure {
  margin: 34px 0 8px;
  text-align: center;
}

.sfa-figure__link {
  display: block;
  border: 1px solid var(--sfa-rule);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .15s;
}

.sfa-figure__link:hover,
.sfa-figure__link:focus-visible { border-color: var(--cosmic-teal); }

.sfa-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.sfa-figure__caption {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--celestial-silver);
  margin: 12px auto 0;
  max-width: 440px;
}

/* ---- Lightbox ---- */

.sfa-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 7, 11, 0.94);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 16px;
}

.sfa-lightbox[hidden] { display: none; }

.sfa-lightbox__stage {
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

.sfa-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  cursor: zoom-in;
}

.sfa-lightbox.is-zoomed .sfa-lightbox__img {
  max-width: none;
  max-height: none;
  width: 1774px;
  cursor: zoom-out;
}

.sfa-lightbox__hint {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--celestial-silver);
  margin: 14px 0 0;
}

.sfa-lightbox.is-zoomed .sfa-lightbox__hint { display: none; }

.sfa-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
  font-family: var(--font-body);
  color: var(--soft-moonstone);
  background: var(--blue-charcoal);
  border: 1px solid var(--sfa-rule);
  border-radius: 8px;
  cursor: pointer;
}

.sfa-lightbox__close:hover,
.sfa-lightbox__close:focus-visible { border-color: var(--cosmic-teal); color: var(--azure-light); }

body.sfa-noscroll { overflow: hidden; }

@media (max-width: 600px) {
  .sfa-figure { margin: 26px 0 4px; }
  .sfa-lightbox { padding: 52px 8px 8px; }
}


                                    /* ==========================================================================
11. ARTICLE IMAGES (simple in-article photos, no lightbox)
========================================================================== */

.sfa-article-figure {
   margin: 34px 0;
}

.sfa-article-figure img {
   display: block;
   width: 100%;
   height: auto;
   border-radius: 10px;
   border: 1px solid var(--sfa-rule);
}

.sfa-article-figure figcaption {
   font-family: var(--font-body);
   font-size: 13px;
   line-height: 1.6;
   color: var(--celestial-silver);
   margin-top: 10px;
   text-align: center;
}


/* Phone fix (Oct 28): .sfa-article's padding shorthand removed the side padding that .sfa-read provides, so article text touched the screen edges on phones. Desktop is unchanged. */
@media (max-width: 707px) {
  .sfa-article.sfa-read { padding-left: 24px; padding-right: 24px; }
}
