/* ═══════════════════════════════════════════════════════════
   AEROVANIA — Blog listing + article pages
   Loads after field.css. The CMS (/admin) also loads it so its
   preview matches the live article.
   ═══════════════════════════════════════════════════════════ */

/* ── Post cards ───────────────────────────────────────────── */
.fx-post-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--fx-line);
  background: var(--fx-panel);
  box-shadow: var(--fx-shadow);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .35s, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.fx-post-card::after { content: ""; position: absolute; z-index: 3; left: 0; top: 0; height: 2px; width: 100%; background: var(--fx-grad); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fx-post-card:hover { border-color: var(--fx-line2); transform: translateY(-4px); }
.fx-post-card:hover::after { transform: scaleX(1); }
.fx-post-card:hover .fx-photo img { transform: scale(1.045); }

.fx-post-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.fx-post-link:focus-visible { outline: 2px solid var(--fx-cyan); outline-offset: -2px; }
.fx-post-media { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--fx-line); }
.fx-post-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; }
body .fx .fx-post-card h3 { font-size: clamp(20px, 1.7vw, 23px) !important; line-height: 1.18; font-weight: 600; }
.fx-post-card p { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Blog hero: featured article ──────────────────────────── */
.fx-blog-feature { position: relative; min-height: 200px; }
.fx-feature-post { display: block; color: inherit; text-decoration: none; border: 1px solid var(--fx-line2); background: var(--fx-panel); box-shadow: var(--fx-shadow); transition: border-color .35s; }
.fx-feature-post:hover { border-color: var(--fx-cyan); }
.fx-feature-post:hover .fx-photo img { transform: scale(1.03); }
.fx-feature-post:focus-visible { outline: 2px solid var(--fx-cyan); outline-offset: 3px; }
.fx-feature-media { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--fx-line); }
.fx-feature-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 26px; }
body .fx .fx-feature-post h2 { font-size: clamp(22px, 2.2vw, 30px) !important; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.fx-feature-post p { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fx-blog-feature .fx-skel { aspect-ratio: 16 / 13; }

/* ── Listing tools: category chips + search ───────────────── */
.fx-blog-tools { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chips[hidden] { display: none; }
.fx-chips button,
.fx-share a,
.fx-share button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  font: 500 10.5px/1 var(--fx-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fx-tx);
  border: 1px solid var(--fx-line2);
  transition: background .2s, color .2s, border-color .2s;
}
.fx-chips button:hover,
.fx-share a:hover,
.fx-share button:hover { border-color: var(--fx-cyan); color: var(--fx-ink); }
.fx-chips button[aria-pressed="true"] { background: var(--fx-ink); border-color: var(--fx-ink); color: var(--fx-bg); }
.fx-chips button:focus-visible,
.fx-share a:focus-visible,
.fx-share button:focus-visible { outline: 2px solid var(--fx-cyan); outline-offset: 2px; }

.fx-search { position: relative; flex: 0 1 340px; min-width: min(280px, 100%); }
.fx-search input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  font: 400 15px/1.4 var(--fx-sans);
  color: var(--fx-ink);
  background: var(--fx-solid);
  border: 1px solid var(--fx-line2);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.fx-search input::placeholder { color: var(--fx-mut); opacity: .8; }
.fx-search input:focus { outline: none; border-color: var(--fx-cyan); box-shadow: 0 0 0 3px var(--fx-glow); }
.fx-search::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: var(--fx-mut);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.fx-blog-count { font: 500 11px/1.4 var(--fx-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fx-mut); }
.fx-load-more { display: flex; justify-content: center; margin-top: 32px; }
.fx-load-more[hidden] { display: none; }
.fx-post-grid .fx-news-card.is-skel { min-height: 380px; }

/* tag chips used as links */
a.fx-tag { text-decoration: none; transition: border-color .2s, color .2s; }
a.fx-tag:hover { border-color: var(--fx-cyan); color: var(--fx-ink); }

/* ── Article page ─────────────────────────────────────────── */
.fx-article-head { position: relative; max-width: 880px; }
.fx-article-head > * + * { margin-top: 22px; }
body .fx .fx-article-hero h1 { font-size: clamp(36px, 4.8vw, 66px) !important; line-height: 1.02; font-weight: 600; letter-spacing: -.045em; }
.fx-article-hero .fx-hero-lede { max-width: 60ch; }
.fx-article-byline { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 500 11px/1.4 var(--fx-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fx-mut); }
.fx-article-byline b { font-weight: 500; color: var(--fx-ink); }
.fx-article-cover { position: relative; margin-top: clamp(32px, 4vw, 52px); aspect-ratio: 21 / 9; border: 1px solid var(--fx-line); }
.fx-article-cover.is-empty { display: none; }
@media (max-width: 620px) { .fx-article-cover { aspect-ratio: 16 / 10; } }

.fx-preview-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px dashed var(--fx-orange);
  font: 500 11px/1.5 var(--fx-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fx-orange);
}
.fx-preview-banner[hidden] { display: none; }

body .fx .fx-section.fx-article-section { padding-top: clamp(48px, 6vw, 80px); border-top: 0; }
.fx-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 5vw, 88px); align-items: start; }
.fx-article-aside { position: sticky; top: 100px; display: grid; gap: 28px; }
.fx-aside-block .fx-kicker { margin-bottom: 14px; }
.fx-share { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-aside-card { padding: 22px; border: 1px solid var(--fx-line2); background: radial-gradient(ellipse at 100% 0%, var(--fx-glow), transparent 60%), var(--fx-panel); }
.fx-aside-card > * + * { margin-top: 12px; }
body .fx .fx-aside-card h4 { font-size: 19px !important; line-height: 1.2; font-weight: 600; }
.fx-aside-card p { font-size: 14px; }
.fx-aside-card .fx-btn { min-height: 46px; margin-top: 18px; }

@media (max-width: 960px) {
  .fx-article-layout { grid-template-columns: 1fr; }
  .fx-article-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* ── Prose (article body) ─────────────────────────────────── */
.fx-prose { max-width: 70ch; font-size: 17px; line-height: 1.75; color: var(--fx-tx); overflow-wrap: break-word; }
.fx-prose > * + * { margin-top: 1.15em; }
.fx-prose > :first-child { margin-top: 0; }
.fx-prose p { line-height: 1.75; }
body .fx .fx-prose h2 { margin-top: 1.9em; font-size: clamp(24px, 2.3vw, 31px) !important; line-height: 1.15; font-weight: 600; }
body .fx .fx-prose h3 { margin-top: 1.6em; font-size: 21px !important; line-height: 1.25; font-weight: 600; }
body .fx .fx-prose h4 { margin-top: 1.4em; font-size: 17px !important; line-height: 1.3; font-weight: 600; }
.fx-prose a { color: var(--fx-cyan); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.fx-prose strong { color: var(--fx-ink); font-weight: 600; }
.fx-prose ul { list-style: disc; padding-left: 1.3em; }
.fx-prose ol { list-style: decimal; padding-left: 1.4em; }
.fx-prose li + li { margin-top: .45em; }
.fx-prose li::marker { color: var(--fx-cyan); }
.fx-prose blockquote { margin: 1.7em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--fx-orange); font-size: 1.1em; line-height: 1.6; color: var(--fx-ink); }
.fx-prose blockquote > * + * { margin-top: .7em; }
.fx-prose img { display: block; max-width: 100%; height: auto; border: 1px solid var(--fx-line); }
.fx-prose figure { margin: 1.9em 0; }
.fx-prose figcaption { margin-top: 10px; font: 500 11px/1.5 var(--fx-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fx-mut); }
.fx-prose hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--fx-line); }
.fx-prose code { padding: 2px 6px; font-family: var(--fx-mono); font-size: .86em; background: var(--fx-bg2); border: 1px solid var(--fx-line); }
.fx-prose pre { overflow-x: auto; padding: 18px 20px; font-size: 14px; line-height: 1.6; background: #08131f; color: #d6e6f2; border: 1px solid #22405a; }
.fx-prose pre code { padding: 0; background: none; border: 0; color: inherit; }
.fx-prose-table { overflow-x: auto; border: 1px solid var(--fx-line); background: var(--fx-panel); }
.fx-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.fx-prose th { padding: 13px 16px; text-align: left; white-space: nowrap; font: 500 10.5px/1.3 var(--fx-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fx-mut); border-bottom: 1px solid var(--fx-line2); }
.fx-prose td { padding: 13px 16px; border-bottom: 1px solid var(--fx-line); vertical-align: top; }
.fx-prose tr:last-child td { border-bottom: 0; }
.fx-prose td:first-child { color: var(--fx-ink); font-weight: 600; }

.fx-prose-skel { display: grid; gap: 14px; }
.fx-prose-skel .fx-skel { height: 14px; }
.fx-prose-skel .fx-skel:nth-child(3n) { width: 72%; }

/* ── Not found ────────────────────────────────────────────── */
.fx-notfound { max-width: 640px; }
.fx-notfound > * + * { margin-top: 20px; }
