/* src/styles/atmosphere-glass.css */
/* Verbatim assembly for the Blog Post template — copied from origin/main
   wyre-ai: src/layouts/Layout.astro (atmosphere markup ~259-265, CSS
   ~387-471 incl. reduced-motion guard) + src/styles/brand.css (glass
   tokens 172-173, glass system 193-204). Repo is source of truth; do not
   hand-edit values here without re-syncing from source. */

:root {
  --wyre-glass-fill: rgba(255, 255, 255, 0.045);
  --wyre-glass-fill-strong: rgba(255, 255, 255, 0.065);
  --wyre-glass-border: rgba(255, 255, 255, 0.10);
  --wyre-glass-border-lit: rgba(255, 255, 255, 0.20);
  --wyre-glass-hi: rgba(255, 255, 255, 0.28);
  --wyre-blur: 20px;
  --wyre-blur-lg: 30px;
  --wyre-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --wyre-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wyre-shadow-glass:
    0 1px 0 0 var(--wyre-glass-hi) inset,
    0 0 0 1px rgba(0, 0, 0, 0.30),
    0 24px 60px -24px rgba(0, 0, 0, 0.85);
}

/* `.glass` classId never resolves through node.classIds (no matching
   site.styleRules entry was ever registered by these API-driven builds —
   classIds require a real styleRules registry entry, not just a string on
   the node), so the intended glass effect silently never rendered.
   Targeting by tag instead sidesteps the whole classId/styleRules
   registration path. `header nav` is the actual glass pill (header itself
   is just the sticky positioning shell, matching the real conduit.wyre.ai
   nav-shell > nav-wrap > nav structure) — `main article` is the blog-index
   cards. border-radius: 14px matches the real .nav rule exactly (was 16px,
   an approximation from before the real value was pulled). */
.glass, header nav, main article {
  position: relative;
  background: var(--wyre-glass-fill);
  backdrop-filter: blur(var(--wyre-blur)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--wyre-blur)) saturate(165%);
  border: 1px solid var(--wyre-glass-border);
  border-radius: 14px;
  box-shadow: var(--wyre-shadow-glass);
}
.glass::before, header nav::before, main article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--wyre-glass-hi), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.04));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

/* ---------- Atmospheric background: cyan light sources ---------- */
.wyre-atmosphere-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.wyre-atmosphere-bg::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
}
.wyre-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.9;
  will-change: transform;
}
.wyre-orb--1 {
  top: -180px;
  left: 50%;
  width: 760px;
  height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(0, 201, 219, 0.30), rgba(0, 201, 219, 0.05) 55%, transparent 70%);
  animation: wyre-orb-drift1 22s var(--wyre-ease) infinite alternate;
}
.wyre-orb--2 {
  top: 620px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 201, 219, 0.18), transparent 68%);
  animation: wyre-orb-drift2 26s var(--wyre-ease) infinite alternate;
}
.wyre-orb--3 {
  top: 1500px;
  right: -140px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(151, 215, 0, 0.10), transparent 66%);
  animation: wyre-orb-drift1 30s var(--wyre-ease) infinite alternate;
}
.wyre-orb--4 {
  top: 2500px;
  left: 40%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 201, 219, 0.13), transparent 68%);
  animation: wyre-orb-drift2 24s var(--wyre-ease) infinite alternate;
}
@keyframes wyre-orb-drift1 {
  from { transform: translate(-50%, 0); }
  to { transform: translate(-50%, 42px); }
}
@keyframes wyre-orb-drift2 {
  from { transform: translate(0, 0); }
  to { transform: translate(28px, -36px); }
}

.wyre-atmosphere-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .wyre-orb { animation: none; }
}

/* Blog post body — markdown renders inside a base.outlet div nested directly
   under the reading column's <main>. font-family/color/line-height on the
   outlet's own inline styles inherit fine into generated <p>/<li>/<em>, but
   headings and links carry their own UA defaults (heading intrinsic sizing,
   anchor blue) that inheritance alone won't override, so they need explicit
   rules. Scoped to `main` since the template has exactly one. */
main h1, main h2, main h3, main h4 {
  font-family: Oswald, sans-serif;
  font-weight: 400;
  text-transform: none;
  line-height: 1.2;
  color: #e5e7eb;
  margin: 2rem 0 1rem;
}
main h1 { font-size: 1.9rem; }
main h2 { font-size: 1.55rem; }
main h3 { font-size: 1.25rem; }
main h4 { font-size: 1.05rem; }
main > div p { margin: 0 0 1.25rem; }
main a { color: #00C9DB; text-decoration: underline; text-underline-offset: 2px; }
main a:hover { color: #fffa6e; }

/* Header "Sign up" CTA hover — the CTA sets its background inline (element
   modules don't support pseudo-classes on props), so overriding it on
   :hover needs a real stylesheet rule + !important, the one legitimate use
   here since nothing else should ever out-specificity a hover state. */
nav a[href="https://conduit.wyre.ai/signup"]:hover {
  background: #82b800 !important;
}
main ul, main ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
main li { margin-bottom: 0.5rem; }
main blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--wyre-glass-border-lit);
  opacity: 0.85;
}
main code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--wyre-glass-fill-strong);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
main pre {
  overflow-x: auto;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
  background: var(--wyre-glass-fill-strong);
  border: 1px solid var(--wyre-glass-border);
  border-radius: 8px;
}
main pre code { background: none; padding: 0; }
main img { max-width: 100%; height: auto; border-radius: 8px; }
main hr { border: none; border-top: 1px solid var(--wyre-glass-border); margin: 2rem 0; }
