/* FF V4.7 — Imperial C Blend
   Header-integrated language switcher + more realistic Roman article framing.
   Visual/navigation layer only. No translation, SEO, audio, or article-content writes. */

/* ------------------------------
   HEADER LANGUAGE SWITCHER
-------------------------------- */
.ff-header-inner {
  align-items: center;
  gap: 12px;
}
.ff-header-inner > .wp-block-navigation {
  flex: 1 1 auto;
  min-width: 0;
}
.ff-header-inner > .ff-languages--inline {
  flex: 0 0 auto;
}

.ff-languages--inline {
  position: relative;
  display: block;
  margin-left: .25rem;
  padding: 0;
  background: none;
  border: 0;
  z-index: 30;
}
.ff-languages--inline summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .44rem;
  min-height: 40px;
  padding: .48rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(214,186,115,.28);
  background: linear-gradient(180deg, rgba(20,54,42,.72), rgba(8,28,21,.9));
  color: #f4e6c2;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 8px 20px rgba(0,0,0,.14);
}
.ff-languages--inline summary::-webkit-details-marker { display: none; }
.ff-languages--inline summary::marker { content: ''; }
.ff-languages--inline summary:hover,
.ff-languages--inline[open] summary,
.ff-languages--inline summary:focus-visible {
  border-color: rgba(224,195,123,.5);
  background: linear-gradient(180deg, rgba(28,68,53,.86), rgba(10,34,25,.96));
}
.ff-languages--inline .ff-lang-globe {
  font-size: .94rem;
  line-height: 1;
  color: #d6b66f;
  opacity: .95;
}
.ff-languages--inline .ff-lang-flag {
  font-size: 1rem;
  line-height: 1;
}
.ff-languages--inline .ff-lang-code {
  font: 700 .78rem/1 system-ui, sans-serif;
  letter-spacing: .16em;
  color: #efe4c7;
}
.ff-languages--inline .ff-languages-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  gap: .42rem;
  min-width: 220px;
  padding: .68rem;
  border-radius: 16px;
  border: 1px solid rgba(214,186,115,.26);
  background:
    radial-gradient(circle at top right, rgba(214,186,115,.08), transparent 32%),
    linear-gradient(180deg, rgba(8,30,23,.98), rgba(5,20,15,.98));
  box-shadow: 0 22px 44px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.02);
}
.ff-languages--inline .ff-language-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .58rem;
  min-height: 40px;
  padding: .56rem .68rem;
  color: #f3ead6;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(214,186,115,.16);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
}
.ff-languages--inline .ff-language-link:hover,
.ff-languages--inline .ff-language-link:focus-visible {
  border-color: rgba(224,195,123,.38);
  background: linear-gradient(180deg, rgba(25,62,48,.82), rgba(9,30,22,.94));
}
.ff-languages--inline .ff-language-link[aria-current="page"] {
  border-color: rgba(224,195,123,.5);
  background: linear-gradient(180deg, rgba(40,78,60,.85), rgba(12,38,29,.97));
}
.ff-languages--inline .ff-lang-name {
  font: 500 .92rem/1.2 system-ui, sans-serif;
  letter-spacing: .01em;
  color: #f6efdf;
}
.ff-languages--inline .ff-language-link .ff-lang-code {
  font-size: .72rem;
  color: #d8bf84;
  letter-spacing: .14em;
}

@media (max-width: 960px) {
  .ff-header-inner {
    gap: 8px;
  }
  .ff-languages--inline summary {
    min-height: 36px;
    padding: .42rem .62rem;
  }
  .ff-languages--inline .ff-languages-list {
    min-width: 196px;
  }
}

@media (max-width: 782px) {
  .ff-header-inner {
    position: relative;
  }
  .ff-header-inner > .ff-languages--inline {
    margin-left: 0;
  }
  .ff-languages--inline .ff-languages-list {
    right: 0;
    min-width: min(210px, calc(100vw - 24px));
  }
}

/* ------------------------------
   IMPERIAL C BLEND — ARTICLE HERO
-------------------------------- */
.single-post {
  --ff-v47-gold: #d6b66f;
  --ff-v47-gold-soft: rgba(214,182,111,.22);
  --ff-v47-cream: #efe3c2;
  --ff-v47-ink: #04140f;
  --ff-v47-column: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 760'%3E%3Cdefs%3E%3ClinearGradient id='shaft' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%234a5b52'/%3E%3Cstop offset='0.18' stop-color='%236d7d72'/%3E%3Cstop offset='0.32' stop-color='%2326362f'/%3E%3Cstop offset='0.52' stop-color='%238b9d90'/%3E%3Cstop offset='0.7' stop-color='%2325322c'/%3E%3Cstop offset='1' stop-color='%235b6c63'/%3E%3C/linearGradient%3E%3ClinearGradient id='trim' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23e1c57f'/%3E%3Cstop offset='1' stop-color='%238e6e2f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg opacity='.98'%3E%3Cpath d='M24 84h92v560H24z' fill='url(%23shaft)'/%3E%3Cg opacity='.45' stroke='%23c8ae73' stroke-width='2'%3E%3Cpath d='M36 96v536'/%3E%3Cpath d='M48 96v536'/%3E%3Cpath d='M60 96v536'/%3E%3Cpath d='M72 96v536'/%3E%3Cpath d='M84 96v536'/%3E%3Cpath d='M96 96v536'/%3E%3Cpath d='M108 96v536'/%3E%3C/g%3E%3Cpath d='M18 56h104v32H18z' fill='url(%23trim)'/%3E%3Cpath d='M14 30h112v28H14z' fill='%23ceb46c'/%3E%3Cpath d='M8 12h124v20H8z' fill='%23aa8240'/%3E%3Cpath d='M16 646h108v34H16z' fill='url(%23trim)'/%3E%3Cpath d='M10 680h120v34H10z' fill='%23c8ae73'/%3E%3Cpath d='M4 714h132v24H4z' fill='%23856a34'/%3E%3Crect x='18' y='56' width='104' height='624' fill='none' stroke='%23f4dfaa' stroke-opacity='.18'/%3E%3C/g%3E%3C/svg%3E");
  --ff-v47-statue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 420'%3E%3Cg fill='none' stroke='%23d6b66f' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M199 72c19 14 31 41 31 69 0 45-27 81-68 88-45 8-91-22-103-69-12-47 18-95 68-108 27-7 54-2 72 12' stroke-width='8' opacity='.48'/%3E%3Cpath d='M109 117c8-31 33-50 63-50 16 0 32 5 44 16' stroke-width='5' opacity='.42'/%3E%3Cpath d='M91 171c0-31 23-63 57-71 33-8 66 7 81 36' stroke-width='4.5' opacity='.35'/%3E%3Cpath d='M96 188c4 41 30 74 67 82 36 8 72-9 89-43' stroke-width='5' opacity='.38'/%3E%3Cpath d='M138 150c7-8 17-12 28-10 9 2 17 8 20 16' stroke-width='4' opacity='.38'/%3E%3Cpath d='M137 199c9 6 19 9 30 8 11-1 20-6 28-14' stroke-width='5' opacity='.42'/%3E%3Cpath d='M120 249c17 15 42 25 66 24 23-1 45-10 61-26' stroke-width='6' opacity='.34'/%3E%3Cpath d='M83 242c13 42 39 76 78 97 13 7 27 11 41 13' stroke-width='7' opacity='.28'/%3E%3Cpath d='M81 312c26-12 52-19 77-19 30 0 58 8 84 23' stroke-width='7' opacity='.24'/%3E%3Cpath d='M96 317v42m132-30v34' stroke-width='7' opacity='.18'/%3E%3Cpath d='M83 360h159' stroke-width='12' opacity='.18'/%3E%3Cpath d='M68 390h188' stroke-width='15' opacity='.14'/%3E%3C/g%3E%3C/svg%3E");
  --ff-v47-lion: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e2c57e' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='60' cy='60' r='42' stroke-width='2.6' opacity='.95'/%3E%3Ccircle cx='60' cy='60' r='28' stroke-width='1.8' opacity='.6'/%3E%3Cpath d='M28 58c0-19 14-35 32-38 18-3 36 9 42 27 6 19-2 38-19 47-17 8-37 4-49-10-4-5-6-11-6-19z' stroke-width='3' opacity='.94'/%3E%3Cpath d='M45 50c4-7 10-10 17-10 7 0 13 4 17 10' stroke-width='2.8'/%3E%3Cpath d='M49 63c3 3 7 5 11 5 5 0 9-2 12-5' stroke-width='2.8'/%3E%3Cpath d='M54 57h11' stroke-width='2.6'/%3E%3Cpath d='M39 40l9 7M81 40l-9 7' stroke-width='2.5'/%3E%3Cpath d='M36 73c7 9 15 13 24 13 9 0 18-4 26-13' stroke-width='2.4' opacity='.75'/%3E%3C/g%3E%3C/svg%3E");
  --ff-v47-ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 32'%3E%3Cg fill='none' stroke='%23d6b66f' stroke-linecap='round'%3E%3Cpath d='M16 16c28 0 32-10 56-10s28 10 54 10 31-10 54-10 28 10 54 10 30-10 54-10' stroke-width='2'/%3E%3Cpath d='M56 16c10 0 10-8 20-8s10 8 20 8 10-8 20-8' stroke-width='1.3' opacity='.72'/%3E%3Cpath d='M204 16c10 0 10-8 20-8s10 8 20 8 10-8 20-8' stroke-width='1.3' opacity='.72'/%3E%3Ccircle cx='16' cy='16' r='2.6' fill='%23d6b66f' stroke='none'/%3E%3Ccircle cx='324' cy='16' r='2.6' fill='%23d6b66f' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}

@media (min-width: 1200px) {
  .single-post .ff-single > .alignwide {
    position: relative;
    isolation: isolate;
  }
  .single-post .ff-single > .alignwide::before,
  .single-post .ff-single > .alignwide::after {
    content: "";
    position: absolute;
    top: 38px;
    bottom: 0;
    width: 86px;
    background: var(--ff-v47-column) no-repeat center/100% 100%;
    opacity: .6;
    pointer-events: none;
    filter: drop-shadow(0 18px 28px rgba(0,0,0,.24));
  }
  .single-post .ff-single > .alignwide::before { left: -92px; }
  .single-post .ff-single > .alignwide::after  { right: -92px; transform: scaleX(-1); }
}

.single-post .ff-article-hero {
  position: relative;
  overflow: visible;
}
.single-post .ff-article-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  width: min(320px, 58vw);
  height: 32px;
  background: var(--ff-v47-ornament) no-repeat center/100% 100%;
  opacity: .96;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.28));
  pointer-events: none;
}

.single-post .ff-article-intro,
.single-post .ff-documentary-player {
  position: relative;
  overflow: hidden;
  border-color: rgba(214,182,111,.34);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025),
    0 18px 34px rgba(0,0,0,.18);
}

.single-post .ff-article-intro::before,
.single-post .ff-documentary-player::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
}
.single-post .ff-article-intro::before {
  background-image:
    radial-gradient(circle at 78% 18%, rgba(214,182,111,.12), transparent 18%),
    var(--ff-v47-statue);
  background-size: auto, 286px auto;
  background-position: 78% 18%, right -18px top 8px;
  opacity: .18;
}
.single-post .ff-documentary-player::before {
  background-image:
    radial-gradient(circle at 18% 88%, rgba(214,182,111,.1), transparent 20%),
    var(--ff-v47-statue);
  background-size: auto, 240px auto;
  background-position: 18% 88%, left -56px bottom -10px;
  opacity: .12;
  transform: scaleX(-1);
}

.single-post .ff-article-intro::after,
.single-post .ff-documentary-player::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid rgba(214,182,111,.42);
  background:
    radial-gradient(circle at 28% 26%, rgba(255,255,255,.12), transparent 32%),
    linear-gradient(180deg, rgba(16,46,35,.96), rgba(7,24,18,.98));
  background-image:
    radial-gradient(circle at 28% 26%, rgba(255,255,255,.12), transparent 32%),
    var(--ff-v47-lion),
    linear-gradient(180deg, rgba(16,46,35,.96), rgba(7,24,18,.98));
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  background-size: auto, 64px 64px, auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 12px 22px rgba(0,0,0,.22);
  pointer-events: none;
}
.single-post .ff-article-intro::after { top: -20px; left: -20px; }
.single-post .ff-documentary-player::after { top: -20px; right: -20px; }

.single-post .ff-article-intro h1,
.single-post .ff-article-intro .ff-hero-deck,
.single-post .ff-article-intro .ff-meta {
  position: relative;
  z-index: 1;
}

.single-post .ff-documentary-player {
  padding: 14px;
  background:
    radial-gradient(circle at 14% 12%, rgba(213,180,106,.09), transparent 24%),
    linear-gradient(180deg, rgba(10,33,24,.95), rgba(5,20,14,.98));
}
.single-post .ff-documentary-player iframe {
  border-color: rgba(214,182,111,.24);
  box-shadow: 0 12px 22px rgba(0,0,0,.16);
}

/* Premium in-article media framing */
.single-post .ff-reading-body figure,
.single-post .ff-reading-body .wp-block-image,
.single-post .ff-reading-body .wp-block-embed.is-provider-youtube,
.single-post .ff-reading-body .wp-block-embed.is-provider-vimeo {
  position: relative;
  overflow: hidden;
}
.single-post .ff-reading-body figure::before,
.single-post .ff-reading-body .wp-block-image::before,
.single-post .ff-reading-body .wp-block-embed.is-provider-youtube::before,
.single-post .ff-reading-body .wp-block-embed.is-provider-vimeo::before {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
    var(--ff-v47-statue);
  background-size: auto, 190px auto;
  background-position: center, right -34px bottom -10px;
  opacity: .12;
}
.single-post .ff-reading-body figure::after,
.single-post .ff-reading-body .wp-block-image::after,
.single-post .ff-reading-body .wp-block-embed.is-provider-youtube::after,
.single-post .ff-reading-body .wp-block-embed.is-provider-vimeo::after {
  width: min(210px, 54vw);
  height: 20px;
  top: 8px;
  background: var(--ff-v47-ornament) no-repeat center/100% 100%;
  opacity: .82;
}
.single-post .ff-reading-body figure img,
.single-post .ff-reading-body .wp-block-image img {
  position: relative;
  z-index: 1;
}

/* Softer mobile version with still-visible motifs */
@media (max-width: 1023px) {
  .single-post .ff-article-hero::after {
    width: min(240px, 62vw);
    height: 22px;
    top: -10px;
  }
  .single-post .ff-article-intro::before {
    background-size: auto, 220px auto;
    background-position: 78% 18%, right -30px top 20px;
    opacity: .12;
  }
  .single-post .ff-documentary-player::before {
    background-size: auto, 180px auto;
    background-position: 18% 88%, left -44px bottom -14px;
    opacity: .08;
  }
  .single-post .ff-article-intro::after,
  .single-post .ff-documentary-player::after {
    width: 64px;
    height: 64px;
    background-size: auto, 48px 48px, auto;
  }
  .single-post .ff-reading-body figure::before,
  .single-post .ff-reading-body .wp-block-image::before,
  .single-post .ff-reading-body .wp-block-embed.is-provider-youtube::before,
  .single-post .ff-reading-body .wp-block-embed.is-provider-vimeo::before {
    background-size: auto, 128px auto;
    background-position: center, right -28px bottom -6px;
    opacity: .1;
  }
}

@media (max-width: 640px) {
  .ff-languages--inline summary {
    gap: .38rem;
    min-height: 34px;
    padding: .4rem .56rem;
  }
  .ff-languages--inline .ff-lang-code {
    letter-spacing: .12em;
    font-size: .74rem;
  }
  .ff-languages--inline .ff-languages-list {
    right: -2px;
    gap: .34rem;
    padding: .55rem;
    border-radius: 14px;
  }
  .ff-languages--inline .ff-language-link {
    min-height: 38px;
    padding: .52rem .58rem;
  }
  .ff-languages--inline .ff-lang-name {
    font-size: .86rem;
  }

  .single-post .ff-article-hero::after {
    width: min(184px, 64vw);
    height: 18px;
  }
  .single-post .ff-article-intro::before {
    background-size: auto, 162px auto;
    opacity: .1;
  }
  .single-post .ff-documentary-player::before {
    background-size: auto, 130px auto;
    opacity: .07;
  }
  .single-post .ff-article-intro::after,
  .single-post .ff-documentary-player::after {
    width: 52px;
    height: 52px;
    background-size: auto, 39px 39px, auto;
  }
  .single-post .ff-reading-body figure::before,
  .single-post .ff-reading-body .wp-block-image::before,
  .single-post .ff-reading-body .wp-block-embed.is-provider-youtube::before,
  .single-post .ff-reading-body .wp-block-embed.is-provider-vimeo::before {
    background-size: auto, 92px auto;
    opacity: .09;
  }
  .single-post .ff-reading-body figure::after,
  .single-post .ff-reading-body .wp-block-image::after,
  .single-post .ff-reading-body .wp-block-embed.is-provider-youtube::after,
  .single-post .ff-reading-body .wp-block-embed.is-provider-vimeo::after {
    width: min(150px, 56vw);
    height: 15px;
    opacity: .72;
  }
}
