/* ==========================================================================
   Palm Beach FileMaker — Blog styles
   Shared by blog/index.html and every blog/<slug>.html article page.
   Tokens match the rest of the site (index.html :root). Hand-edited file:
   the build script never overwrites it.
   ========================================================================== */

:root {
  --navy: #0b2a45;
  --navy-700: #123a5c;
  --teal: #17a2a8;
  --teal-dark: #0f7c81;
  --teal-light: #6fd6d9;
  --sand: #f4ede2;
  --sand-line: #e6dccb;
  --ink: #16232e;
  --muted: #5a6b78;
  --white: #ffffff;
  --gold: #f2b705;
  --shadow: 0 18px 45px -20px rgba(11, 42, 69, .35);
  --radius: 16px;
  --maxw: 1140px;
  --measure: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -100px; background: #fff; color: var(--navy); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--teal-dark); margin-bottom: 16px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .98rem;
  padding: 15px 28px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -10px rgba(23,162,168,.7); }
.btn-primary:hover { transform: translateY(-2px); background: var(--teal-dark); }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(11,42,69,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand img { height: 55px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--navy); }
.nav-links a[aria-current] { box-shadow: inset 0 -2px 0 var(--teal); }
.nav-links a.nav-cta { color: #fff; padding: 11px 22px; font-size: .9rem; box-shadow: 0 10px 24px -10px rgba(23,162,168,.7); }
.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

.breadcrumb { background: var(--sand); font-size: .85rem; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--sand-line); }
.breadcrumb ol { list-style: none; display: flex; gap: 6px; min-width: 0; }
.breadcrumb li { white-space: nowrap; }
.breadcrumb li:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: var(--ink); }

/* ---------- Category chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-filemaker        { background: rgba(23,162,168,.13); color: #0b6a6f; }
.chip-web-development  { background: rgba(11,42,69,.08);   color: var(--navy); }
.chip-agentic-ai       { background: rgba(242,183,5,.2);   color: #6e5300; }
.chip-draft            { background: #fde7e4; color: #a12b1d; }
.chip-draft::before    { display: none; }

/* ---------- Blog index hero ---------- */
.blog-hero {
  background:
    radial-gradient(1100px 460px at 85% -10%, rgba(23,162,168,.28), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, #0e3455 55%, #10456b 100%);
  color: #fff;
}
.blog-hero .wrap { padding-top: 76px; padding-bottom: 84px; }
.blog-hero .eyebrow { color: var(--teal-light); }
.blog-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 820px; margin-bottom: 18px; }
.blog-hero h1 em { font-style: normal; color: var(--teal-light); }
.blog-hero p { font-size: 1.14rem; color: rgba(255,255,255,.84); max-width: 640px; }
.blog-hero .feed-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; font-size: .9rem; font-weight: 600; color: var(--teal-light); border-bottom: 1px solid rgba(111,214,217,.4); padding-bottom: 2px; }
.blog-hero .feed-link:hover { color: #fff; border-color: #fff; }
.blog-hero .feed-link svg { width: 15px; height: 15px; }

/* ---------- Topic filter ---------- */
.blog-list { padding: 56px 0 96px; }
.filters { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.js .filters { display: flex; }
.filters button {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--sand-line);
  background: #fff; color: var(--muted); transition: border-color .15s, color .15s, background .15s;
}
.filters button:hover { border-color: var(--teal); color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters .count { font-weight: 500; opacity: .7; margin-left: 4px; }
.empty-note { color: var(--muted); padding: 30px 0; }

/* ---------- Post cards (index, related, homepage strip) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.post-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--sand-line); border-radius: var(--radius);
  padding: 28px 28px 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.post-card[hidden] { display: none; }
.post-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-size: .84rem; color: var(--muted); }
.post-card h3 { font-size: 1.28rem; color: var(--navy); margin-bottom: 12px; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card h3 a:focus-visible { outline: none; }
.post-card:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.post-card p { color: var(--muted); font-size: .97rem; flex: 1; }
.post-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--sand-line); font-size: .85rem; color: var(--muted); }
.post-card-foot .go { font-weight: 600; color: var(--teal-dark); }

/* ---------- Article header ---------- */
.post-head { background: var(--sand); border-bottom: 1px solid var(--sand-line); }
.post-head .inner { max-width: var(--measure); margin: 0 auto; padding: 64px 0 52px; }
.post-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); color: var(--navy); margin: 18px 0 20px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: .92rem; color: var(--muted); }
.post-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--sand-line); }
.post-meta strong { color: var(--ink); font-weight: 600; }

/* ---------- Article body ---------- */
.post-body { max-width: var(--measure); margin: 0 auto; padding: 48px 0 24px; }

.answer {
  position: relative; background: #fff; border: 1px solid var(--sand-line); border-left: 5px solid var(--teal);
  border-radius: 12px; padding: 24px 26px; margin-bottom: 42px; box-shadow: 0 14px 34px -26px rgba(11,42,69,.5);
}
.answer .label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: 8px; }
.answer p { font-size: 1.1rem; line-height: 1.65; color: var(--ink); }

.prose { font-size: 1.07rem; line-height: 1.78; color: #24333f; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); color: var(--navy); margin-top: 2em; }
.prose h3 { font-size: 1.25rem; color: var(--navy); margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose a { color: var(--teal-dark); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--navy); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--teal); }
.prose blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 20px; color: var(--muted); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--sand-line); margin: 2.2em 0; }
.prose code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: rgba(11,42,69,.06); color: var(--navy); padding: .15em .4em; border-radius: 5px; }
.prose pre {
  background: var(--navy); color: #e3eef3; border-radius: 12px; padding: 20px 22px;
  overflow-x: auto; font-size: .86rem; line-height: 1.65; -webkit-overflow-scrolling: touch;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sand-line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--navy); background: var(--sand); }
.table-scroll { overflow-x: auto; }

.post-updated { margin-top: 32px; font-size: .88rem; color: var(--muted); }

.author {
  display: flex; gap: 18px; align-items: flex-start; margin-top: 52px; padding: 26px;
  background: var(--sand); border-radius: var(--radius);
}
.author .mark {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--teal-light);
  font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 600;
}
.author h2 { font-size: 1.1rem; color: var(--navy); margin-bottom: 4px; }
.author p { font-size: .95rem; color: var(--muted); }
.author a { color: var(--teal-dark); font-weight: 600; }
.author a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Related ---------- */
.related { padding: 64px 0 96px; }
.related h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy); margin-bottom: 28px; }
.related .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.related .all { margin-top: 30px; }
.related .all a { color: var(--teal-dark); font-weight: 600; border-bottom: 1px solid rgba(15,124,129,.35); padding-bottom: 2px; }
.related .all a:hover { color: var(--navy); border-color: var(--navy); }

/* ---------- CTA band ---------- */
.cta {
  background:
    radial-gradient(900px 400px at 100% 0%, rgba(23,162,168,.25), transparent 60%),
    linear-gradient(160deg, var(--navy), #0e3a5e);
  color: #fff; text-align: center; padding: 84px 0;
}
.cta .eyebrow { color: var(--teal-light); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 16px; }
.cta p { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 600px; margin: 0 auto 30px; }

/* ---------- Footer ---------- */
footer.site { background: #071e33; color: rgba(255,255,255,.7); padding: 48px 0 30px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.foot-brand img { height: 54px; width: auto; display: block; mix-blend-mode: screen; }
.foot-links { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.foot-links a { font-size: .92rem; transition: color .15s; }
.foot-links a:hover { color: var(--teal-light); }
.foot-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }

/* ---------- Draft banner (only in --drafts builds) ---------- */
.draft-banner { background: #a12b1d; color: #fff; text-align: center; font-size: .88rem; font-weight: 600; padding: 8px 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: flex-start;
    background: #fff; padding: 24px; gap: 20px; border-bottom: 1px solid var(--sand-line);
    transform: translateY(-130%); transition: transform .25s ease; visibility: hidden;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; }
  .nav-links a[aria-current] { box-shadow: none; color: var(--teal-dark); }
}
@media (max-width: 780px) {
  .post-head .inner, .post-body { padding-left: 0; padding-right: 0; }
  .post-head .inner { padding-top: 44px; padding-bottom: 38px; }
  .post-body { padding-top: 34px; }
}
@media (max-width: 640px) {
  .post-grid, .related .post-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-hero .wrap { padding-top: 56px; padding-bottom: 60px; }
  .blog-list { padding: 40px 0 72px; }
  .answer { padding: 20px; }
  .answer p { font-size: 1.04rem; }
  .prose { font-size: 1.03rem; }
  .prose pre { margin-left: -24px; margin-right: -24px; border-radius: 0; }
  .author { flex-direction: column; }
  .cta { padding: 64px 0; }
  .related { padding: 52px 0 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
