/*
Theme Name: Facts with Juhi
Theme URI: https://factswithjuhi.in
Author: Facts with Juhi
Description: Custom block theme for Facts with Juhi, a Marathi infotainment channel. Teal + lamp-amber palette, Instagram reel grid, YouTube section and blog.
Version: 0.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: factswithjuhi
*/

:root {
  --fwj-night: #0F2A30;
  --fwj-teal: #1E4A52;
  --fwj-teal-2: #2A6670;
  --fwj-amber: #F2A93B;
  --fwj-amber-soft: #FDE7C2;
  --fwj-coral: #E8613C;
  --fwj-cream: #FBF6EE;
  --fwj-paper: #FFFFFF;
  --fwj-ink: #18201F;
  --fwj-muted: #5C6A69;
  --fwj-line: rgba(15, 42, 48, .12);
  --fwj-radius: 22px;
  --fwj-shadow: 0 18px 40px -22px rgba(15, 42, 48, .45);
  --fwj-display: 'Baloo 2', 'Mukta', system-ui, sans-serif;
  --fwj-body: 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fwj-cream); color: var(--fwj-ink); font-family: var(--fwj-body); font-size: 1.125rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fwj-teal); }
h1, h2, h3, h4 { font-family: var(--fwj-display); color: var(--fwj-night); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.fwj-main > * { margin-block: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.fwj-container { width: min(1180px, 100% - 48px); margin-inline: auto; }
.fwj-narrow { max-width: 820px; }
.fwj-center { justify-content: center; text-align: center; }

/* ---------- Buttons ---------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.wp-block-button__link, .fwj-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: .8em 1.6em; border-radius: 999px;
  font-family: var(--fwj-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; border: 2px solid transparent;
}
.fwj-btn-main .wp-block-button__link { background: var(--fwj-amber); color: var(--fwj-night); box-shadow: 0 10px 24px -10px rgba(242, 169, 59, .8); }
.fwj-btn-main .wp-block-button__link:hover { transform: translateY(-2px); background: #FFB94F; }
.fwj-btn-alt .wp-block-button__link { background: transparent; color: var(--fwj-teal); border-color: currentColor; }
.fwj-btn-alt .wp-block-button__link:hover { background: var(--fwj-teal); color: var(--fwj-cream); border-color: var(--fwj-teal); }
.fwj-hero .fwj-btn-alt .wp-block-button__link { color: var(--fwj-cream); }
.fwj-hero .fwj-btn-alt .wp-block-button__link:hover { background: var(--fwj-cream); color: var(--fwj-night); border-color: var(--fwj-cream); }
.fwj-btn--ghost { border-color: var(--fwj-teal); color: var(--fwj-teal); }

/* ---------- Header ---------- */
.fwj-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 246, 238, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
.fwj-header.is-scrolled { border-color: var(--fwj-line); box-shadow: 0 6px 24px -18px rgba(15, 42, 48, .6); }
.fwj-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.fwj-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fwj-night); }
.fwj-brand__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--fwj-teal); color: var(--fwj-amber); font-family: var(--fwj-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; transform: rotate(-6deg); box-shadow: 4px 4px 0 var(--fwj-amber); }
.fwj-brand__name { font-family: var(--fwj-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; white-space: nowrap; }
.fwj-brand__name em { font-style: normal; color: var(--fwj-coral); font-weight: 600; }
.fwj-brand--light { color: var(--fwj-cream); }
.fwj-nav, .fwj-nav .wp-block-navigation__container { display: flex; align-items: center; gap: 6px; }
.fwj-nav a { padding: .45em .9em; border-radius: 999px; text-decoration: none; color: var(--fwj-night); font-weight: 600; font-size: 1.02rem; transition: background .2s; }
.fwj-nav a:hover, .fwj-nav a[aria-current="page"], .fwj-nav .current-menu-item > a { background: var(--fwj-amber-soft); }

/* ---------- Hero ---------- */
.fwj-hero {
  position: relative; overflow: hidden; color: var(--fwj-cream); padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 9vw, 120px);
  background:
    radial-gradient(600px 420px at 8% 30%, rgba(242, 169, 59, .28), transparent 70%),
    radial-gradient(800px 600px at 100% 100%, rgba(42, 102, 112, .7), transparent 70%),
    linear-gradient(160deg, var(--fwj-teal) 0%, var(--fwj-night) 100%);
}
.fwj-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.fwj-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.fwj-eyebrow { display: inline-block; padding: .35em 1em; border-radius: 999px; background: rgba(242, 169, 59, .16); color: var(--fwj-amber); font-weight: 700; font-size: .95rem; letter-spacing: .02em; border: 1px solid rgba(242, 169, 59, .35); }
.fwj-hero__title { color: var(--fwj-cream); font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.01em; margin: .35em 0 .35em; }
.fwj-hero__title mark { background: none; color: var(--fwj-amber); position: relative; white-space: nowrap; }
.fwj-hero__title mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; background: var(--fwj-coral); border-radius: 4px; opacity: .85; z-index: -1; }
.fwj-hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: rgba(251, 246, 238, .82); max-width: 34ch; margin-bottom: 1.8em; }
.fwj-stats { list-style: none; padding: 0; margin: 2.4em 0 0; display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.fwj-stats li { display: flex; flex-direction: column; }
.fwj-stats strong { font-family: var(--fwj-display); font-size: 2rem; color: var(--fwj-amber); line-height: 1; }
.fwj-stats span { font-size: .95rem; color: rgba(251, 246, 238, .7); }
.fwj-hero__media { position: relative; }
.fwj-hero__frame { position: relative; border-radius: 32px; padding: 10px; background: linear-gradient(145deg, rgba(242,169,59,.9), rgba(232,97,60,.7)); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); transform: rotate(2deg); max-width: 440px; margin-left: auto; }
.fwj-hero__frame img { border-radius: 24px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; }
.fwj-hero__tag { position: absolute; padding: .5em 1em; border-radius: 14px; background: var(--fwj-cream); color: var(--fwj-night); font-weight: 700; font-size: .95rem; box-shadow: var(--fwj-shadow); transform: rotate(-2deg); }
.fwj-hero__tag--top { top: 28px; left: -28px; }
.fwj-hero__tag--bottom { bottom: 32px; right: -18px; background: var(--fwj-amber); }

/* ---------- Sections ---------- */
.fwj-section { padding: clamp(56px, 7vw, 96px) 0; }
.fwj-kicker { margin: 0 0 .4em; font-weight: 700; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fwj-coral); }
.fwj-section__title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .8em; }
.fwj-section__title span { color: var(--fwj-teal-2); }
.fwj-section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.fwj-link-arrow a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--fwj-amber); padding-bottom: 2px; }

/* Topics */
.fwj-topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fwj-topic { position: relative; display: block; padding: 28px; background: var(--fwj-paper); border-radius: var(--fwj-radius); text-decoration: none; color: var(--fwj-ink); border: 1px solid var(--fwj-line); transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden; }
.fwj-topic::before { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--fwj-amber-soft); transition: transform .35s; }
.fwj-topic:hover { transform: translateY(-4px); box-shadow: var(--fwj-shadow); border-color: transparent; }
.fwj-topic:hover::before { transform: scale(1.4); }
.fwj-topic > * { position: relative; }
.fwj-topic__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--fwj-cream); font-size: 1.6rem; margin-bottom: 16px; }
.fwj-topic h3 { font-size: 1.6rem; margin: 0; }
.fwj-topic small { display: block; color: var(--fwj-coral); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; margin-bottom: .6em; }
.fwj-topic p { color: var(--fwj-muted); margin: 0; font-size: 1.02rem; }

/* Reels */
.fwj-reels { background: var(--fwj-paper); }
.fwj-reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(326px, 1fr)); gap: 24px; margin-bottom: 32px; }
.fwj-reel { display: flex; justify-content: center; }
.fwj-reel .instagram-media { margin: 0 !important; width: 100% !important; max-width: 400px !important; min-width: 300px !important; border-radius: 18px !important; border: 1px solid var(--fwj-line) !important; box-shadow: var(--fwj-shadow) !important; }
.fwj-reel blockquote.instagram-media:not([data-instgrm-payload-id]) { display: grid; place-items: center; min-height: 520px; background: linear-gradient(160deg, var(--fwj-teal), var(--fwj-night)); padding: 24px; }
.fwj-reel blockquote.instagram-media:not([data-instgrm-payload-id]) a { color: var(--fwj-amber); font-weight: 700; }

/* YouTube */
.fwj-yt-empty { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 32px; border-radius: var(--fwj-radius); background: var(--fwj-paper); border: 2px dashed var(--fwj-line); }
.fwj-yt-empty p { margin: 0; flex: 1 1 260px; }
.fwj-yt-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #FF0033; color: #fff; font-size: 1.5rem; }
.fwj-yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.fwj-yt { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; box-shadow: var(--fwj-shadow); background: #000; }
.fwj-yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.fwj-yt-feature { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; padding: clamp(18px, 2.5vw, 28px); margin-bottom: 36px; background: var(--fwj-night); border-radius: 28px; color: var(--fwj-cream); }
.fwj-yt-feature h3 { color: var(--fwj-cream); font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin: .5em 0 1em; }
.fwj-badge { display: inline-block; padding: .25em .8em; border-radius: 999px; background: #FF0033; color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
.fwj-btn--red { background: #FF0033; color: #fff; }
.fwj-btn--red:hover { background: #fff; color: #FF0033; }
.fwj-shorts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.fwj-short { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: var(--fwj-night); text-decoration: none; box-shadow: 0 14px 30px -20px rgba(15, 42, 48, .7); transition: transform .25s, box-shadow .25s; }
.fwj-short img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fwj-short::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 42, 48, .95) 0%, rgba(15, 42, 48, .35) 45%, transparent 70%); }
.fwj-short:hover { transform: translateY(-4px); box-shadow: var(--fwj-shadow); }
.fwj-short:hover img { transform: scale(1.05); }
.fwj-short__play { position: absolute; z-index: 1; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 0, 51, .92); color: #fff; font-size: .85rem; }
.fwj-short__title { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px; color: #fff; font-weight: 600; font-size: .98rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fwj-cta .fwj-btn-yt .wp-block-button__link { background: #FF0033; }
.fwj-cta .fwj-btn-yt .wp-block-button__link:hover { background: #d4002a; }

/* About strip */
.fwj-about-strip { background: linear-gradient(180deg, var(--fwj-cream), var(--fwj-amber-soft)); }
.fwj-about-strip__grid { display: grid; grid-template-columns: 320px 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.fwj-avatar { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid var(--fwj-paper); box-shadow: 0 0 0 3px var(--fwj-amber), var(--fwj-shadow); }
.fwj-avatar--lg { border-radius: 32px; aspect-ratio: 4 / 5; object-position: 50% 30%; }
.fwj-values { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fwj-values li { padding: 18px; background: var(--fwj-paper); border-radius: 16px; border: 1px solid var(--fwj-line); }
.fwj-values strong { display: block; font-family: var(--fwj-display); font-size: 1.15rem; color: var(--fwj-teal); }
.fwj-values span { font-size: .98rem; color: var(--fwj-muted); }

/* Blog cards */
.fwj-post-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fwj-post-card { height: 100%; background: var(--fwj-paper); border-radius: var(--fwj-radius); overflow: hidden; border: 1px solid var(--fwj-line); padding-bottom: 20px; transition: transform .25s, box-shadow .25s; }
.fwj-post-card:hover { transform: translateY(-4px); box-shadow: var(--fwj-shadow); }
.fwj-post-card > *:not(.wp-block-post-featured-image) { padding-inline: 22px; }
.fwj-post-card .wp-block-post-title { font-size: 1.35rem; margin: .3em 0; }
.fwj-post-card .wp-block-post-title a { text-decoration: none; color: var(--fwj-night); }
.fwj-post-card__cat a { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fwj-coral); text-decoration: none; }
.fwj-post-card__cat { margin-top: 18px; }
.fwj-empty { padding: 28px 32px; border-radius: var(--fwj-radius); background: var(--fwj-paper); border: 2px dashed var(--fwj-line); margin: 0; }

/* CTA */
.fwj-cta { position: relative; overflow: hidden; padding: clamp(56px, 7vw, 90px) 0; background: var(--fwj-amber); text-align: center; }
.fwj-cta::before, .fwj-cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.fwj-cta::before { width: 260px; height: 260px; left: -80px; top: -120px; }
.fwj-cta::after { width: 180px; height: 180px; right: -40px; bottom: -90px; }
.fwj-cta__inner { position: relative; z-index: 1; }
.fwj-cta__title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.fwj-cta__text { font-size: 1.2rem; color: var(--fwj-night); max-width: 46ch; margin: 0 auto 1.6em; }
.fwj-cta .fwj-btn-main .wp-block-button__link { background: var(--fwj-night); color: var(--fwj-cream); box-shadow: none; }
.fwj-cta .fwj-btn-main .wp-block-button__link:hover { background: var(--fwj-teal); }

/* Page hero */
.fwj-page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); background: linear-gradient(160deg, var(--fwj-teal), var(--fwj-night)); color: var(--fwj-cream); }
.fwj-page-hero__title { color: var(--fwj-cream); font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 0; }
.fwj-page-hero .fwj-meta, .fwj-page-hero p { color: rgba(251, 246, 238, .75); }
.fwj-page-hero a { color: var(--fwj-amber); }
.fwj-prose { width: min(760px, 100% - 48px); margin-inline: auto; }
.fwj-lead-center { text-align: center; font-size: 1.3rem; max-width: 40ch; margin: 0 auto 2em; }

/* Contact */
.fwj-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fwj-contact-card { display: block; padding: 30px; border-radius: var(--fwj-radius); background: var(--fwj-paper); border: 1px solid var(--fwj-line); text-decoration: none; color: var(--fwj-ink); transition: transform .25s, box-shadow .25s; }
a.fwj-contact-card:hover { transform: translateY(-4px); box-shadow: var(--fwj-shadow); }
.fwj-contact-card p { color: var(--fwj-muted); }
.fwj-contact-card__cta { font-weight: 700; color: var(--fwj-teal); }

/* Footer */
.fwj-footer { background: var(--fwj-night); color: rgba(251, 246, 238, .75); padding: 64px 0 28px; }
.fwj-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.fwj-footer__about { margin: 18px 0; max-width: 40ch; }
.fwj-footer h4 { color: var(--fwj-amber); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; }
.fwj-footer nav a { display: block; color: rgba(251, 246, 238, .8); text-decoration: none; padding: 4px 0; }
.fwj-footer nav a:hover { color: var(--fwj-amber); }
.fwj-social { display: flex; gap: 10px; }
.fwj-social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: var(--fwj-cream); transition: background .2s, color .2s; }
.fwj-social a:hover { background: var(--fwj-amber); color: var(--fwj-night); }
.fwj-social--pending { opacity: .45; pointer-events: none; }
.fwj-footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .fwj-hero__grid { grid-template-columns: 1fr; }
  .fwj-hero__frame { margin: 0 auto; max-width: 360px; }
  .fwj-topic-grid, .fwj-post-grid, .fwj-contact-grid { grid-template-columns: repeat(2, 1fr); }
  .fwj-yt-feature { grid-template-columns: 1fr; }
  .fwj-about-strip__grid { grid-template-columns: 1fr; text-align: center; }
  .fwj-about-strip__grid .fwj-avatar { max-width: 240px; margin: 0 auto; }
  .fwj-values { grid-template-columns: 1fr; text-align: left; }
  .fwj-footer__grid { grid-template-columns: 1fr 1fr; }
  .fwj-footer__grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .fwj-container { width: calc(100% - 32px); }
  .fwj-header__bar { min-height: 64px; }
  .fwj-brand__name { font-size: 1.2rem; }
  .fwj-topic-grid, .fwj-post-grid, .fwj-contact-grid { grid-template-columns: 1fr; }
  .fwj-hero__tag--top { left: -6px; }
  .fwj-hero__tag--bottom { right: -6px; }
  .fwj-reel-grid { grid-template-columns: 1fr; }
  .fwj-shorts-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fwj-short__title { font-size: .88rem; -webkit-line-clamp: 3; }
  /* plain-link nav (static preview); WordPress shows its hamburger menu here instead */
  nav.fwj-nav:not(.wp-block-navigation) { overflow-x: auto; gap: 0; max-width: 55vw; }
  nav.fwj-nav:not(.wp-block-navigation) a { padding: .4em .55em; font-size: .95rem; white-space: nowrap; }
}
.wp-block-navigation__responsive-container.is-menu-open { background: var(--fwj-cream) !important; }
.wp-block-navigation__responsive-container.is-menu-open a { font-size: 1.4rem; }
