/* ============================================
   TMT THEME — BLOG PAGE STYLES
   File: assets/css/blog.css
   Loads ONLY on page-blog.php template


/* ============================================
   SECTION SHELL
   ============================================ */

.bh-section {
  position: relative;
  background-color: var(--color-bg-main);
  overflow: hidden;
  padding-top: 7rem;           /* clears fixed nav */
  padding-bottom: 0;           /* divider strip sits flush at bottom */
  min-height: 72vh;
  display: flex;
  align-items: flex-start;
}


/* ============================================
   BACKGROUND — editorial atmosphere
   Three layered systems, all GPU-composite
   ============================================ */

/* Layer 1 — Subtle top-left light source */
.bh-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 0% 0%,
      rgba(69, 123, 157, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 40% at 100% 100%,
      rgba(168, 218, 220, 0.04) 0%,
      transparent 55%
    );
  pointer-events: none;
  z-index: 0;
  animation: bhAtmoBreathe 12s ease-in-out infinite alternate;
  will-change: opacity;
}

@keyframes bhAtmoBreathe {
  from { opacity: 0.7; }
  to   { opacity: 1;   }
}

/* Layer 2 — Fine editorial grid texture
   Horizontal lines only — like ruled paper */
.bh-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    rgba(168, 218, 220, 0.022) 1px,
    transparent 1px
  );
  background-size: 100% 48px;
  pointer-events: none;
  z-index: 0;
}


/* ============================================
   CONTAINER — full-width editorial grid
   ============================================ */

.bh-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}


/* ============================================
   TOP BAR — eyebrow + issue/date meta
   Sits above the main grid, full width
   ============================================ */

.bh-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);

  opacity: 0;
  animation: bhFadeDown 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

/* Eyebrow left side */
.bh-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bh-eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
  flex-shrink: 0;
  animation: bhDotPulse 3s ease-in-out infinite;
}

@keyframes bhDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.bh-eyebrow__text {
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Right side meta */
.bh-topbar__meta {
  font-size: 0.68rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}


/* ============================================
   MAIN EDITORIAL GRID
   Desktop: [index number | content | —]
   Asymmetric — the number anchors left,
   content dominates center-left
   ============================================ */

.bh-grid {
  display: grid;
  grid-template-columns: 4rem 1fr;
  grid-template-areas:
    'index content';
  gap: 0 clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}


/* ============================================
   INDEX NUMBER — vertical editorial marker
   Pure CSS counter — no JS, no hardcoded text
   ============================================ */

.bh-index {
  grid-area: index;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 0.35rem;    /* aligns with heading cap height */

  opacity: 0;
  animation: bhFadeIn 0.5s ease 0.15s both;
}

.bh-index__number {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  color: var(--color-accent);
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);    /* reads top-to-bottom */
  margin-bottom: 0.875rem;
}

/* Vertical tick line below number */
.bh-index__tick {
  display: block;
  width: 1px;
  flex: 1;
  min-height: 3rem;
  background: linear-gradient(
    180deg,
    rgba(168, 218, 220, 0.4),
    transparent
  );
}


/* ============================================
   CONTENT COLUMN — headline + subtext + meta
   ============================================ */

.bh-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}


/* ============================================
   HEADLINE — H1
   The visual anchor. Large, tight, editorial.
   ============================================ */

.bh-heading {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: var(--weight-bold);
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--color-text-primary);
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  max-width: 14em;

  /* Modern CSS text wrapping — prevents widow words */
  text-wrap: balance;

  opacity: 0;
  animation: bhFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Accent phrase — a single line that glows slightly */
.bh-heading__accent {
  color: var(--color-accent);
  font-style: normal;
  position: relative;
  display: inline;
}


/* ============================================
   SUPPORTING TEXT
   ============================================ */

.bh-subtext {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin: 0 0 clamp(2rem, 4vw, 3rem);

  /* Balance prevents awkward last-line widows */
  text-wrap: balance;

  opacity: 0;
  animation: bhFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}


/* ============================================
   META ROW — article count + categories
   Pipe separators via CSS ::before pseudo
   ============================================ */

.bh-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;

  opacity: 0;
  animation: bhFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.48s both;
}

.bh-meta__item {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-inline: 0.875rem;
  position: relative;
  transition: color 0.3s ease;
}

/* First item — no left padding or pipe */
.bh-meta__item:first-child {
  padding-left: 0;
}

/* Pipe separator — CSS-only, between all items */
.bh-meta__item + .bh-meta__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.875em;
  background-color: var(--color-border);
}

/* Accent item — count or primary label */
.bh-meta__item--accent {
  color: var(--color-text-secondary);
  font-weight: var(--weight-semibold);
}

/* Category tags — subtle hover */
.bh-meta__item a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.bh-meta__item a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.bh-meta__item a:hover { color: var(--color-accent); }
.bh-meta__item a:hover::after { transform: scaleX(1); }

.bh-meta__item a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ============================================
   BOTTOM DIVIDER STRIP
   Full-width editorial rule — sits flush at
   the section bottom, separates from next section
   ============================================ */

.bh-divider {
  position: relative;
  width: 100%;
  height: 1px;
  margin-top: clamp(3rem, 6vw, 5rem);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border) 10%,
    rgba(168, 218, 220, 0.15) 50%,
    var(--color-border) 90%,
    transparent 100%
  );

  opacity: 0;
  animation: bhFadeIn 0.5s ease 0.65s both;
}

/* Small accent dot centered on divider */
.bh-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-accent);
  opacity: 0.6;
}


/* ============================================
   SHARED KEYFRAMES
   ============================================ */

@keyframes bhFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bhFadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bhFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .bh-section {
    min-height: auto;
    padding-top: 6rem;
  }

  .bh-heading {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  }
}


/* ============================================
   RESPONSIVE — MOBILE LANDSCAPE (≤ 768px)
   Index number collapses — content full-width
   ============================================ */

@media (max-width: 768px) {
  .bh-section {
    padding-top: 5rem;
  }

  /* Collapse grid — single column */
  .bh-grid {
    grid-template-columns: 1fr;
    grid-template-areas: 'content';
    gap: 0;
  }

  /* Hide vertical index on mobile — clean single-column */
  .bh-index {
    display: none;
  }

  .bh-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .bh-heading {
    letter-spacing: -0.035em;
    max-width: none;
  }

  .bh-subtext {
    max-width: none;
  }

  .bh-meta {
    gap: 0;
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}


/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */

@media (max-width: 480px) {
  .bh-section {
    padding-top: 4.5rem;
  }

  .bh-meta__item {
    padding-inline: 0.625rem;
    font-size: 0.6875rem;
  }

  .bh-meta__item:first-child {
    padding-left: 0;
  }
}


/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .bh-section::before {
    animation: none !important;
  }

  .bh-topbar,
  .bh-index,
  .bh-heading,
  .bh-subtext,
  .bh-meta,
  .bh-divider {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .bh-eyebrow__dot {
    animation: none !important;
  }

  .bh-meta__item a,
  .bh-meta__item a::after {
    transition: none !important;
  }
}

/* ============================================
   TMT THEME — FEATURED ARTICLE SECTION
   Namespace: fa- (Featured Article)
   Append to: assets/css/blog.css
   (after all bh- styles)

   CONCEPT: "The Frame"
   ─────────────────────────────────────────────
   The image is not inside a card — it IS the
   left column. No border-radius on the image.
   Like a magazine double-page spread.

   The content side has a thin left accent rule,
   a category chip, editorial-scale headline,
   and a draw-in underline CTA.

   The outer panel border glows on hover.
   Nothing moves except the image (slight zoom)
   and the CTA underline.

   CSS TECHNIQUES:
   • CSS Grid — asymmetric 55/45 split
   • aspect-ratio on image wrapper (no CLS)
   • clip-path transition on image overlay
   • transform: scale on image (GPU only)
   • filter: brightness transition (GPU only)
   • ::before draw-in underline on CTA
   • Gradient left-rule on content column
   • text-wrap: balance on headline
   • @keyframes stagger scroll-in reveal
   • No JavaScript. No layout shift.
   ============================================ */


/* ============================================
   SECTION SHELL
   ============================================ */

.fa-section {
  position: relative;
  background-color: var(--color-bg-main);
  padding-block: clamp(4rem, 7vw, 6.5rem);
}


/* ============================================
   CONTAINER
   ============================================ */

.fa-container {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}


/* ============================================
   SECTION LABEL ROW
   Sits above the panel — editorial publication
   style section identifier
   ============================================ */

.fa-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);

  opacity: 0;
  animation: faFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.fa-label__rule {
  display: block;
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  flex-shrink: 0;
}

.fa-label__text {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.fa-label__rule--right {
  background: linear-gradient(90deg, transparent, var(--color-border));
  flex: 1;
  max-width: none;
  width: auto;
}


/* ============================================
   PANEL — the interactive editorial unit
   CSS Grid: image left (55%) · content right
   Hover on .fa-panel triggers all child states
   ============================================ */

.fa-panel {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: 480px;

  /* Outer atmospheric border */
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius-lg);
  overflow: hidden;       /* clips image to panel corners */
  position: relative;

  /* Scroll-in reveal */
  opacity: 0;
  animation: faReveal 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;

  /* Hover: border glow — nothing moves */
  transition:
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

.fa-panel:hover {
  border-color: rgba(168, 218, 220, 0.28);
  box-shadow:
    0 0 0 1px rgba(168, 218, 220, 0.04),
    0 32px 80px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(168, 218, 220, 0.04);
}


/* ============================================
   IMAGE COLUMN — left, full-bleed
   No border-radius — bleeds to panel edge.
   Image zooms on panel hover, not on img hover.
   ============================================ */

.fa-image-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-secondary);

  /* Aspect ratio locks height regardless of content —
     prevents CLS on image load */
  aspect-ratio: 4 / 3;
  height: 100%;            /* stretches to match content col */
  min-height: 360px;
}

.fa-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;

  /* Resting: slightly desaturated, dim */
  filter: brightness(0.82) saturate(0.9);
  transform: scale(1);
  transform-origin: center;

  transition:
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.6s ease;
  will-change: transform, filter;
}

/* Image reacts to PANEL hover — not self-hover */
.fa-panel:hover .fa-image-wrap img {
  transform: scale(1.04);
  filter: brightness(0.92) saturate(1);
}

/* Gradient overlay — always present, deepens on hover */
.fa-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(11, 19, 43, 0.55) 0%,
    rgba(11, 19, 43, 0.15) 55%,
    transparent 100%
  );
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.fa-panel:hover .fa-image-wrap::after {
  opacity: 0.75;
}

/* Category chip — sits on top-left of image */
.fa-image-chip {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  background-color: rgba(11, 19, 43, 0.72);
  border: 1px solid rgba(168, 218, 220, 0.2);
  border-radius: var(--border-radius-full);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  font-size: 0.6rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);

  /* Appears after panel reveal */
  opacity: 0;
  transform: translateY(-4px);
  animation: faFadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}


/* ============================================
   CONTENT COLUMN — right side
   Left accent rule via ::before on wrapper
   ============================================ */

.fa-content {
  position: relative;
  background-color: var(--color-bg-card);
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
}

/* Left accent rule — draws down on panel hover */
.fa-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-accent) 25%,
    var(--color-accent) 75%,
    transparent 100%
  );
  opacity: 0.4;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.fa-panel:hover .fa-content::before {
  transform: scaleY(1);
  opacity: 0.65;
}


/* ── Content top group ── */

.fa-content__top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Meta row: category · read time · date */
.fa-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fa-meta__item {
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding-inline: 0.75rem;
  position: relative;
  white-space: nowrap;
}

.fa-meta__item:first-child { padding-left: 0; }

/* Pipe separator */
.fa-meta__item + .fa-meta__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.75em;
  background-color: var(--color-border);
}

/* Category meta item — accented */
.fa-meta__item--cat {
  color: var(--color-accent);
  font-weight: var(--weight-semibold);
}

/* Headline */
.fa-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: var(--weight-bold);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--color-text-primary);
  margin: 0;
  text-wrap: balance;

  /* Subtle lift on hover — opacity only, no transform */
  transition: opacity 0.3s ease;
}

.fa-panel:hover .fa-heading {
  opacity: 0.95;
}

/* Excerpt */
.fa-excerpt {
  font-size: clamp(0.875rem, 1.4vw, 0.9375rem);
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 44ch;
  margin: 0;
  text-wrap: balance;
}


/* ── Content bottom: CTA ── */

.fa-content__bottom {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

/* Author mini byline */
.fa-byline {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fa-byline__name {
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.fa-byline__role {
  font-size: 0.6rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Editorial CTA — text link with draw-in underline */
.fa-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
  transition: color 0.35s ease;
}

/* Underline draws in from left */
.fa-cta::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fa-cta:hover {
  color: var(--color-accent);
}

.fa-cta:hover::after { transform: scaleX(1); }

.fa-cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Arrow */
.fa-cta__arrow {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.fa-cta:hover .fa-cta__arrow { transform: translateX(4px); }

/* Full-panel accessible link overlay */
.fa-panel__link {
  position: absolute;
  inset: 0;
  z-index: 3;
  font-size: 0;
  color: transparent;
  border-radius: inherit;
}

.fa-panel__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}


/* ============================================
   SHARED KEYFRAMES
   ============================================ */

@keyframes faFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes faReveal {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .fa-panel {
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
  }
}


/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   Single column. Image on top. Full-bleed.
   ============================================ */

@media (max-width: 768px) {
  .fa-section {
    padding-block: clamp(3rem, 6vw, 4.5rem);
  }

  .fa-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: var(--card-radius);
  }

  .fa-image-wrap {
    height: auto;
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  /* No hover effects on touch */
  .fa-panel:hover .fa-image-wrap img {
    transform: none;
  }

  .fa-panel:hover {
    border-color: var(--color-border);
    box-shadow: none;
  }

  .fa-panel:hover .fa-content::before {
    transform: scaleY(0);
  }

  .fa-content {
    gap: 1.5rem;
  }

  .fa-excerpt {
    max-width: none;
  }

  .fa-content__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}


/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */

@media (max-width: 480px) {
  .fa-image-wrap {
    aspect-ratio: 4 / 3;
  }

  .fa-label {
    gap: 0.75rem;
  }
}


/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .fa-label,
  .fa-panel,
  .fa-image-chip {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .fa-image-wrap img,
  .fa-image-wrap::after,
  .fa-content::before,
  .fa-cta,
  .fa-cta::after,
  .fa-cta__arrow,
  .fa-panel {
    transition: none !important;
  }
}

/* ============================================
   TMT THEME — ARTICLE GRID SECTION
   Namespace: ag- (Article Grid)
   Append to: assets/css/blog.css
   (after all fa- styles)

   CONCEPT: "The Ledger"
   ─────────────────────────────────────────────
   Articles live on a ruled ledger system.
   Each entry is a full-width horizontal row:
   [thumbnail] [cat-rule] [title+excerpt] [meta]

   On desktop: two staggered columns of ledger rows.
   On mobile: single clean list.

   This is NOT a card grid. It's an editorial index.
   Typography and spacing ARE the design.

   CSS TECHNIQUES:
   • CSS Grid — outer 2-col, inner ledger layout
   • Sub-grid on article rows for column alignment
   • aspect-ratio on thumbnails (no CLS)
   • transform: scale on thumbnail (GPU)
   • filter: brightness on thumbnail (GPU)
   • ::before accent rule per entry
   • CSS counter for entry numbering
   • @keyframes stagger via --i custom property
   • text-wrap: balance on titles
   • No JavaScript. No layout shift.
   ============================================ */


/* ============================================
   SECTION SHELL
   ============================================ */

.ag-section {
  position: relative;
  background-color: var(--color-bg-main);
  padding-block: clamp(4rem, 7vw, 6.5rem);
}

/* Subtle top separator from fa- above */
.ag-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--container-px);
  right: var(--container-px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-border) 20%,
    var(--color-border) 80%,
    transparent
  );
}


/* ============================================
   CONTAINER
   ============================================ */

.ag-container {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}


/* ============================================
   SECTION HEADER
   Left-aligned — label + count + view-all link
   in one balanced row
   ============================================ */

.ag-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid var(--color-border);

  opacity: 0;
  animation: agFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.ag-header__left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.ag-header__title {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  line-height: 1;
}

.ag-header__count {
  font-size: 0.6875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.2rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  line-height: 1.4;
}

/* View-all link */
.ag-header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.ag-header__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-header__link:hover { color: var(--color-accent); }
.ag-header__link:hover::after { transform: scaleX(1); }

.ag-header__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.ag-header__link svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.ag-header__link:hover svg { transform: translateX(3px); }


/* ============================================
   OUTER GRID — two columns on desktop
   Each column is a stack of ledger rows
   ============================================ */

.ag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(2rem, 4vw, 4rem);
  align-items: start;
}


/* ============================================
   COLUMN — a vertical stack of entries
   The dividing line between columns is the gap
   ============================================ */

.ag-col {
  display: flex;
  flex-direction: column;
}

/* Stagger second column down slightly — editorial offset */
.ag-col:last-child {
  padding-top: clamp(2rem, 4vw, 3.5rem);
}


/* ============================================
   ARTICLE ENTRY — the ledger row
   Layout: [thumb] [content] [meta-stack]

   Uses CSS counter for entry number display.
   --i custom property drives stagger delay.
   ============================================ */

/* Counter reset on each column */
.ag-col { counter-reset: ag-entry; }

.ag-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto;
  gap: 0 1.25rem;
  align-items: start;
  position: relative;
  padding-block: clamp(1.5rem, 2.5vw, 2rem);

  /* Top rule between entries */
  border-top: 1px solid var(--color-border);

  /* Scroll-in stagger */
  opacity: 0;
  animation: agEntryReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 0.08s + 0.2s);

  /* Hover: only border-color and bg shift — nothing moves */
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease;
}

/* First entry in each column has no top border */
.ag-entry:first-child {
  border-top: none;
}

.ag-entry:hover {
  background-color: rgba(168, 218, 220, 0.018);
}

/* Full-entry link overlay */
.ag-entry__link {
  position: absolute;
  inset: 0;
  z-index: 2;
  font-size: 0;
  color: transparent;
}

.ag-entry__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  border-radius: var(--border-radius-sm);
}


/* ============================================
   THUMBNAIL — fixed square, left column
   ============================================ */

.ag-entry__thumb {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-bg-secondary);
  align-self: start;

  /* Square — consistent regardless of image */
  aspect-ratio: 1 / 1;
}

.ag-entry__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;

  filter: brightness(0.8) saturate(0.85);
  transform: scale(1);
  transform-origin: center;

  transition:
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.5s ease;
  will-change: transform, filter;
}

.ag-entry:hover .ag-entry__thumb img {
  transform: scale(1.07);
  filter: brightness(0.9) saturate(1);
}

/* Subtle tint overlay */
.ag-entry__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(11, 19, 43, 0.35) 0%,
    transparent 60%
  );
  pointer-events: none;
}


/* ============================================
   ENTRY BODY — title + excerpt
   ============================================ */

.ag-entry__body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.5rem;
}

/* Category + counter row */
.ag-entry__top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.ag-entry__cat {
  font-size: 0.6rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1;
}

/* Entry counter — CSS-generated, editorial index feel */
.ag-entry__num {
  font-size: 0.58rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

/* Article title */
.ag-entry__title {
  font-family: var(--font-heading);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
  margin: 0;
  text-wrap: balance;
  transition: color 0.3s ease;
}

.ag-entry:hover .ag-entry__title {
  color: var(--color-accent);
}

/* Excerpt */
.ag-entry__excerpt {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0;

  /* Hard 2-line clamp — no orphaned words */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ============================================
   ENTRY FOOTER — meta + read link
   Below body, still in right column
   ============================================ */

.ag-entry__footer {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  gap: 0.5rem;
}

/* Meta items */
.ag-entry__meta {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.ag-entry__meta-item {
  font-size: 0.625rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding-inline: 0.5rem;
  position: relative;
  white-space: nowrap;
}

.ag-entry__meta-item:first-child { padding-left: 0; }

/* Dot separator */
.ag-entry__meta-item + .ag-entry__meta-item::before {
  content: '·';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-border);
  font-size: 0.7em;
}

/* Read link */
.ag-entry__read {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.625rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
  z-index: 3;      /* sits above .ag-entry__link overlay */
  transition: color 0.3s ease;
}

.ag-entry__read::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-entry:hover .ag-entry__read {
  color: var(--color-accent);
}

.ag-entry:hover .ag-entry__read::after { transform: scaleX(1); }

.ag-entry__read:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.ag-entry__read svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.ag-entry:hover .ag-entry__read svg { transform: translateX(2px); }


/* ============================================
   LOAD MORE — editorial text trigger
   Pure CSS :target trick to show more items.
   Articles beyond 4 per column are hidden
   initially and revealed via CSS :target.

   NOTE: This is a progressive enhancement.
   If posts ≤ 8 total, this element doesn't
   render (controlled in PHP).
   ============================================ */

.ag-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: clamp(3rem, 5vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--color-border);

  opacity: 0;
  animation: agFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
}

.ag-more__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border));
}

.ag-more__rule--right {
  background: linear-gradient(90deg, var(--color-border), transparent);
}

.ag-more__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.ag-more__link:hover { color: var(--color-accent); }

.ag-more__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.ag-more__link svg {
  transition: transform 0.3s ease;
}

.ag-more__link:hover svg { transform: translateY(2px); }


/* ============================================
   SHARED KEYFRAMES
   ============================================ */

@keyframes agFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes agEntryReveal {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .ag-grid {
    gap: 0 clamp(1.5rem, 3vw, 2.5rem);
  }

  .ag-entry__thumb {
    width: 72px;
  }

  /* Remove column offset on tablet */
  .ag-col:last-child {
    padding-top: 0;
  }
}


/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   Single column. Ledger rows stay — just
   stacked in one column.
   ============================================ */

@media (max-width: 768px) {
  .ag-section {
    padding-block: clamp(3rem, 6vw, 4.5rem);
  }

  /* Single column */
  .ag-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ag-col:last-child {
    padding-top: 0;
  }

  /* Entries in second column get top border restored */
  .ag-col:last-child .ag-entry:first-child {
    border-top: 1px solid var(--color-border);
  }

  .ag-entry {
    grid-template-columns: 64px 1fr;
    gap: 0 1rem;
    padding-block: 1.25rem;
  }

  /* No hover image zoom on touch */
  .ag-entry:hover .ag-entry__thumb img {
    transform: none;
  }

  .ag-entry:hover {
    background-color: transparent;
  }

  .ag-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}


/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */

@media (max-width: 480px) {
  .ag-entry {
    grid-template-columns: 56px 1fr;
    gap: 0 0.875rem;
  }

  .ag-entry__excerpt {
    display: none;   /* hide excerpt on very small screens — title only */
  }

  .ag-header__count {
    display: none;
  }
}


/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .ag-header,
  .ag-entry,
  .ag-more {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .ag-entry__thumb img,
  .ag-entry__title,
  .ag-entry__read,
  .ag-entry__read::after,
  .ag-entry__read svg,
  .ag-header__link,
  .ag-header__link::after,
  .ag-header__link svg,
  .ag-more__link,
  .ag-more__link svg {
    transition: none !important;
  }
}

/* ============================================
   TMT THEME — BLOG NEWSLETTER / FINAL CTA
   Namespace: bn- (Blog Newsletter)
   Append to: assets/css/blog.css
   (after all ag- styles)

   CONCEPT: "The Quiet Ask"
   ─────────────────────────────────────────────
   The section doesn't sell. It invites.
   One breathing radial spotlight. Large editorial
   headline. The form is a single hairline rule
   with a borderless input and a text-only submit.
   Nothing more. Nothing less.

   CSS TECHNIQUES:
   • Layered radial-gradient spotlight
   • CSS @keyframes breathing animation
   • ::before noise texture illusion (pattern)
   • Glassmorphism-lite form row
   • Input focus state via :focus-within on wrapper
   • Submit button: liquid fill via ::before
   • text-wrap: balance on headline
   • animation stagger via animation-delay
   • GPU-only: transform + opacity + filter
   • No JavaScript. No layout shift.
   ============================================ */


/* ============================================
   SECTION SHELL
   ============================================ */

.bn-section {
  position: relative;
  background-color: var(--color-bg-secondary); /* #1C2541 — contrast from ag- */
  overflow: hidden;
  padding-block: clamp(5rem, 10vw, 8.5rem);

  /* Top separator */
  border-top: 1px solid transparent;
  border-image: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-border) 15%,
    rgba(168, 218, 220, 0.2) 50%,
    var(--color-border) 85%,
    transparent 100%
  ) 1;
}


/* ============================================
   BACKGROUND — three depth layers
   ============================================ */

/* Layer 1 — Breathing radial spotlight at center */
.bn-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 50%,
      rgba(69, 123, 157, 0.14) 0%,
      rgba(69, 123, 157, 0.04) 50%,
      transparent 72%
    ),
    radial-gradient(
      ellipse 40% 30% at 50% 50%,
      rgba(168, 218, 220, 0.06) 0%,
      transparent 65%
    );
  animation: bnSpotBreathe 9s ease-in-out infinite alternate;
  will-change: opacity, transform;
  pointer-events: none;
  z-index: 0;
}

@keyframes bnSpotBreathe {
  from { opacity: 0.6; transform: scale(0.96); }
  to   { opacity: 1;   transform: scale(1.04); }
}

/* Layer 2 — Corner ambient glows */
.bn-section::after {
  content: '';
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(
      ellipse 45% 35% at 5% 95%,
      rgba(69, 123, 157, 0.06) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 40% 30% at 95% 5%,
      rgba(168, 218, 220, 0.04) 0%,
      transparent 55%
    );
  animation: bnAmbient 16s ease-in-out infinite alternate;
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 0;
}

@keyframes bnAmbient {
  from { transform: translate(-0.5%, 0.5%); opacity: 0.7; }
  to   { transform: translate(0.5%, -0.5%); opacity: 1; }
}


/* ============================================
   CONTAINER — editorial centered column
   ============================================ */

.bn-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;         /* tighter than ag- — focuses the eye */
  margin-inline: auto;
  padding-inline: var(--container-px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


/* ============================================
   EDITORIAL LABEL
   ============================================ */

.bn-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);

  opacity: 0;
  animation: bnFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.bn-label__line {
  display: block;
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  animation: bnLineGrow 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

.bn-label__line--right {
  background: linear-gradient(90deg, var(--color-accent), transparent);
  transform-origin: right;
}

@keyframes bnLineGrow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.bn-label__text {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}


/* ============================================
   HEADLINE
   ============================================ */

.bn-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4.5vw, 3.25rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  text-wrap: balance;

  opacity: 0;
  animation: bnFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Accent word — slightly brighter */
.bn-heading__accent {
  color: var(--color-accent);
  font-style: normal;
}


/* ============================================
   SUPPORTING TEXT
   ============================================ */

.bn-subtext {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 44ch;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-wrap: balance;

  opacity: 0;
  animation: bnFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}


/* ============================================
   FORM — the hairline system
   ─────────────────────────────────────────────
   The form row is a single horizontal rule.
   Input and button sit ON that rule.
   The entire wrapper has no border or background
   until :focus-within — then a subtle glow
   appears via box-shadow on the inner rule.

   Uses native HTML form — no JS.
   WordPress handles submission via action URL
   (or CF7 / Mailchimp integration).
   ============================================ */

.bn-form-wrap {
  width: 100%;
  max-width: 480px;

  opacity: 0;
  animation: bnFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.44s both;
}

/* WordPress CF7 or native form — no extra wrapper needed */
.bn-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* The row: input + button on one hairline rule */
.bn-form__row {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;

  /* The hairline rule IS the form border */
  border-bottom: 1px solid rgba(168, 218, 220, 0.28);

  /* Smooth glow on focus */
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Focus-within: the rule lights up */
.bn-form__row:focus-within {
  border-color: rgba(168, 218, 220, 0.6);
  box-shadow: 0 1px 0 0 rgba(168, 218, 220, 0.15);
}

/* Email input — fills available space */
.bn-form__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.875rem 0 0.875rem 0.125rem;

  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  letter-spacing: 0.01em;

  /* Placeholder */
  caret-color: var(--color-accent);
}

.bn-form__input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
  font-size: 0.9375rem;
}

/* Autofill — prevent browser yellow override */
.bn-form__input:-webkit-autofill,
.bn-form__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 60px var(--color-bg-secondary) inset;
  -webkit-text-fill-color: var(--color-text-primary);
  transition: background-color 5000s ease;
}

/* Submit button — text only, liquid fill on hover */
.bn-form__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.875rem 0 0.875rem 1.25rem;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;

  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);

  position: relative;
  flex-shrink: 0;
  transition: color 0.35s ease;
}

.bn-form__btn:hover { color: var(--color-accent); }

/* Arrow */
.bn-form__btn svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.bn-form__btn:hover svg { transform: translateX(3px); }

/* Focus visible */
.bn-form__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Privacy note below form */
.bn-form__note {
  margin-top: 1.25rem;
  font-size: 0.6rem;
  font-weight: var(--weight-regular);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  opacity: 0.5;
  text-align: center;
}

.bn-form__note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.3s ease;
}

.bn-form__note a:hover { opacity: 0.8; }


/* ============================================
   ALTERNATIVE CTA — if no form is needed
   A single editorial text link with draw-in
   underline. Swap .bn-form-wrap for .bn-alt-cta
   in the PHP if you prefer a link over a form.
   ============================================ */

.bn-alt-cta {
  display: none; /* hidden by default — show via PHP logic */
}

.bn-alt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
  transition: color 0.35s ease;
}

.bn-alt-btn::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bn-alt-btn:hover { color: var(--color-accent); }
.bn-alt-btn:hover::after { transform: scaleX(1); }

.bn-alt-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}


/* ============================================
   BOTTOM EDITORIAL CLOSE
   Three micro-trust items: no lists, no bullets.
   A single refined text row with dot separators.
   ============================================ */

.bn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid rgba(47, 62, 92, 0.6); /* color-border at 60% */
  width: 100%;

  opacity: 0;
  animation: bnFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.bn-close__item {
  font-size: 0.625rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.55;
  padding-inline: 1.25rem;
  position: relative;
  white-space: nowrap;
}

.bn-close__item:first-child { padding-left: 0; }
.bn-close__item:last-child  { padding-right: 0; }

/* Dot separator */
.bn-close__item + .bn-close__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background-color: var(--color-border);
}


/* ============================================
   SHARED KEYFRAMES
   ============================================ */

@keyframes bnFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .bn-container {
    max-width: 600px;
  }
}


/* ============================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================ */

@media (max-width: 768px) {
  .bn-section {
    padding-block: clamp(3.5rem, 8vw, 5rem);
  }

  .bn-heading {
    letter-spacing: -0.03em;
  }

  .bn-form-wrap {
    max-width: 100%;
  }

  .bn-close {
    flex-wrap: wrap;
    row-gap: 0.625rem;
    justify-content: center;
  }

  .bn-close__item {
    padding-inline: 0.875rem;
  }
}


/* ============================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================ */

@media (max-width: 480px) {
  .bn-subtext { max-width: none; }

  /* Stack form on very small screens */
  .bn-form__row {
    flex-direction: column;
    border-bottom: none;
    gap: 0;
  }

  .bn-form__input {
    width: 100%;
    border-bottom: 1px solid rgba(168, 218, 220, 0.28);
    padding: 0.875rem 0;
    text-align: center;
  }

  .bn-form__btn {
    padding: 0.875rem 0;
    width: 100%;
    justify-content: center;
    border-bottom: 1px solid rgba(168, 218, 220, 0.14);
  }

  /* Restore focus state for stacked layout */
  .bn-form__row:focus-within {
    box-shadow: none;
  }

  .bn-form__input:focus {
    border-color: rgba(168, 218, 220, 0.6);
  }

  .bn-close__item {
    padding-inline: 0.625rem;
    font-size: 0.56rem;
  }
}


/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .bn-section::before,
  .bn-section::after {
    animation: none !important;
  }

  .bn-label,
  .bn-heading,
  .bn-subtext,
  .bn-form-wrap,
  .bn-close {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .bn-label__line {
    transform: scaleX(1) !important;
    opacity: 1 !important;
    animation: none !important;
  }

  .bn-form__btn,
  .bn-form__btn svg,
  .bn-form__row,
  .bn-alt-btn,
  .bn-alt-btn::after {
    transition: none !important;
  }
}