/*
Theme Name:   iOVA Child
Theme URI:    https://iova.com.au
Description:  Premium cinematic blog template for iOVA. Child of Astra. Dark hero, Playfair Display + DM Sans, orange #FF6A00 accents, agent-pill auto-styling, scroll progress, drop-cap, pull-quotes, scroll-revealed reading column. Built in Sydney by Evosion.
Author:       Evosion
Author URI:   https://evosion.com.au
Template:     astra
Version:      1.0.0
Text Domain:  iova-child
*/

/* ============================================================
   iOVA brand tokens
   ============================================================ */
:root {
  --iova-ink:        #1A1A1A;
  --iova-ink-2:      #2A2A2A;
  --iova-ink-3:      #3A3A3A;
  --iova-orange:     #FF6A00;
  --iova-orange-2:   #FF8533;
  --iova-surface:    #F5F5F5;
  --iova-surface-2:  #FAFAFA;
  --iova-white:      #FFFFFF;
  --iova-mute:       #6B7280;
  --iova-mute-2:     #9CA3AF;
  --iova-border:     #E5E7EB;

  --iova-serif:      "Playfair Display", "Times New Roman", Georgia, serif;
  --iova-sans:       "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --iova-shadow-sm:  0 1px 2px rgba(26,26,26,0.06);
  --iova-shadow:     0 6px 24px rgba(26,26,26,0.08);
  --iova-shadow-lg:  0 24px 60px rgba(26,26,26,0.15);

  --iova-read-col:   1120px;
  --iova-read-prose: 860px;
}

/* ============================================================
   Reset + global type
   ============================================================ */
html { scroll-behavior: smooth; }

body.iova-blog-single {
  margin: 0;
  font-family: var(--iova-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.75;
  color: var(--iova-ink);
  background: var(--iova-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.iova-blog-single * { box-sizing: border-box; }
.iova-blog-single img,
.iova-blog-single svg { max-width: 100%; height: auto; display: block; }
.iova-blog-single a {
  color: var(--iova-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--iova-orange);
  transition: color .18s ease, border-color .18s ease;
}
.iova-blog-single a:hover { color: var(--iova-orange); }
.iova-blog-single ::selection { background: var(--iova-orange); color: var(--iova-white); }

/* ============================================================
   Scroll-progress bar
   ============================================================ */
.iova-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--iova-orange);
  z-index: 9999;
  transition: width .08s linear;
  box-shadow: 0 0 10px rgba(255,106,0,0.5);
}

/* ============================================================
   Top bar — minimal nav anchored to home
   ============================================================ */
.iova-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--iova-border);
}
.iova-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.iova-wordmark {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--iova-ink);
  border-bottom: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.iova-wordmark .o {
  color: var(--iova-orange);
}
.iova-topbar a.iova-cta-mini {
  font-family: var(--iova-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--iova-white);
  background: var(--iova-ink);
  padding: 10px 18px;
  border-radius: 999px;
  border-bottom: none;
  transition: background .18s ease, transform .18s ease;
}
.iova-topbar a.iova-cta-mini:hover {
  background: var(--iova-orange);
  color: var(--iova-white);
  transform: translateY(-1px);
}

/* ============================================================
   HERO — dark cinematic
   ============================================================ */
.iova-hero {
  background: var(--iova-ink);
  color: var(--iova-white);
  padding: clamp(64px, 9vw, 120px) 24px clamp(48px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
.iova-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(255,106,0,0.10), transparent 60%),
    radial-gradient(80% 60% at 80% 90%, rgba(255,106,0,0.06), transparent 60%);
  pointer-events: none;
}
.iova-hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}
.iova-hero-eyebrow {
  font-family: var(--iova-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--iova-orange);
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(8px);
  animation: iovaFadeUp .8s .1s ease both;
}
.iova-hero-title {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--iova-white);
  max-width: 22ch;
  opacity: 0;
  transform: translateY(16px);
  animation: iovaFadeUp 1s .2s ease both;
}
.iova-hero-accent {
  display: block;
  width: 88px;
  height: 4px;
  background: var(--iova-orange);
  margin: 0 0 28px;
  opacity: 0;
  animation: iovaWiden 1s .35s ease both;
}
.iova-hero-meta {
  font-family: var(--iova-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  opacity: 0;
  animation: iovaFadeUp 1s .5s ease both;
}
.iova-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.iova-hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--iova-orange); }
.iova-hero-meta .iova-cat {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--iova-orange);
  font-size: 12px;
}

@keyframes iovaFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes iovaWiden {
  from { transform: scaleX(0); transform-origin: left; opacity: 0; }
  to   { transform: scaleX(1); transform-origin: left; opacity: 1; }
}

/* ============================================================
   FEATURED IMAGE — parallax frame
   ============================================================ */
.iova-feature-frame {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  transform: translateY(-50px);
}
.iova-feature {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--iova-shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--iova-ink-2);
}
.iova-feature img,
.iova-feature picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform .4s ease;
}
.iova-feature:hover img { transform: scale(1.0); }
.iova-feature .iova-no-image {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--iova-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--iova-orange);
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(255,106,0,0.20), transparent 70%),
    var(--iova-ink);
}

/* ============================================================
   READING COLUMN
   ============================================================ */
.iova-article {
  max-width: var(--iova-read-col);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 32px clamp(48px, 6vw, 96px);
}
/* Prose elements stay readable (~75 char measure); structural blocks span the full width. */
.iova-article > p,
.iova-article > ul,
.iova-article > ol,
.iova-article > h3,
.iova-article > h4 {
  max-width: var(--iova-read-prose);
  margin-left: auto;
  margin-right: auto;
}
.iova-article p,
.iova-article ul,
.iova-article ol,
.iova-article blockquote,
.iova-article figure {
  margin-bottom: 24px;
}
.iova-article h2 {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 56px auto 20px;
  color: var(--iova-ink);
  position: relative;
  padding-left: 18px;
  max-width: var(--iova-read-prose);
}
.iova-article h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 4px; height: 0.6em;
  background: var(--iova-orange);
}
.iova-article h3 {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  margin: 40px 0 16px;
  color: var(--iova-ink);
}
.iova-article h4 {
  font-family: var(--iova-sans);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--iova-orange);
  margin: 36px 0 12px;
}

/* Drop-cap on first paragraph */
.iova-article > p:first-of-type::first-letter {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: 4.4em;
  line-height: 0.88;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--iova-orange);
}

/* Lists */
.iova-article ul,
.iova-article ol { padding-left: 1.5rem; }
.iova-article ul li,
.iova-article ol li { margin-bottom: 10px; padding-left: 6px; }
.iova-article ul li::marker { color: var(--iova-orange); }
.iova-article ol li::marker { color: var(--iova-orange); font-weight: 700; }

/* Pull-quotes */
.iova-article blockquote {
  border-left: 4px solid var(--iova-orange);
  padding: 8px 0 8px 28px;
  margin: 40px auto;
  font-family: var(--iova-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  color: var(--iova-ink-2);
  max-width: var(--iova-read-prose);
}
.iova-article blockquote p { margin: 0 0 8px; }
.iova-article blockquote cite {
  display: block;
  font-family: var(--iova-sans);
  font-style: normal;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--iova-mute);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 12px;
}

/* Code */
.iova-article code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--iova-surface);
  color: var(--iova-ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.iova-article pre {
  background: var(--iova-ink);
  color: var(--iova-white);
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.6;
  margin: 24px 0;
}
.iova-article pre code { background: transparent; color: inherit; padding: 0; }

/* Inline images */
.iova-article img {
  border-radius: 8px;
  margin: 32px auto;
  box-shadow: var(--iova-shadow);
}

/* ============================================================
   AGENT MENTIONS — first mention is a pill, subsequent are tokens
   ============================================================ */

/* Subsequent mentions: bold orange tokens (handled via .iova-agent-name) */
.iova-article .iova-agent-name,
.iova-article strong.iova-agent-name {
  color: var(--iova-orange);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--iova-sans);
  background: linear-gradient(180deg, transparent 70%, rgba(255,106,0,0.14) 70%, rgba(255,106,0,0.14) 92%, transparent 92%);
  padding: 0 2px;
}

/* First mention pill */
.iova-agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  background: var(--iova-ink);
  color: var(--iova-white);
  border-radius: 999px;
  font-family: var(--iova-sans);
  font-weight: 600;
  font-size: 0.92em;
  letter-spacing: 0.5px;
  border-bottom: none;
  transition: background .2s ease, transform .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.iova-agent-pill:hover {
  background: var(--iova-orange);
  color: var(--iova-white);
  transform: translateY(-1px);
}
.iova-agent-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0;
  box-shadow: none;
  object-fit: cover;
  background: var(--iova-ink-2);
}

/* ============================================================
   CTA card
   ============================================================ */
.iova-cta {
  max-width: 960px;
  margin: 80px auto 0;
  padding: 0 24px;
}
.iova-cta-card {
  background: var(--iova-ink);
  color: var(--iova-white);
  border-radius: 16px;
  padding: clamp(40px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--iova-shadow-lg);
}
.iova-cta-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(closest-side, rgba(255,106,0,0.22), transparent 70%);
  pointer-events: none;
}
.iova-cta-card-eyebrow {
  font-family: var(--iova-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--iova-orange);
  margin-bottom: 12px;
  position: relative;
}
.iova-cta-card h3 {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 20ch;
  color: var(--iova-white);
  position: relative;
}
.iova-cta-card p {
  font-family: var(--iova-sans);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
  color: rgba(255,255,255,0.78);
  max-width: 50ch;
  position: relative;
}
.iova-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--iova-orange);
  color: var(--iova-white);
  font-family: var(--iova-sans);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 999px;
  border-bottom: none;
  transition: background .2s ease, transform .2s ease;
  position: relative;
}
.iova-cta-btn:hover {
  background: var(--iova-white);
  color: var(--iova-ink);
  transform: translateY(-2px);
}
.iova-cta-btn::after {
  content: "→";
  transition: transform .2s ease;
}
.iova-cta-btn:hover::after { transform: translateX(4px); }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.iova-related {
  background: var(--iova-surface);
  padding: clamp(60px, 8vw, 100px) 24px;
  margin-top: 80px;
}
.iova-related-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.iova-related h2 {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 36px;
  color: var(--iova-ink);
}
.iova-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.iova-related-card {
  background: var(--iova-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--iova-shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  border-bottom: none;
  color: var(--iova-ink);
}
.iova-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--iova-shadow);
  color: var(--iova-ink);
}
.iova-related-thumb {
  aspect-ratio: 16 / 9;
  background: var(--iova-ink-2);
  overflow: hidden;
}
.iova-related-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.iova-related-card:hover .iova-related-thumb img { transform: scale(1.05); }
.iova-related-thumb-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--iova-orange);
  background:
    radial-gradient(60% 60% at 30% 30%, rgba(255,106,0,0.20), transparent 70%),
    var(--iova-ink);
}
.iova-related-body { padding: 22px 24px 26px; }
.iova-related-cat {
  font-family: var(--iova-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--iova-orange);
  margin-bottom: 8px;
}
.iova-related-title {
  font-family: var(--iova-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--iova-ink);
}
.iova-related-excerpt {
  font-family: var(--iova-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--iova-mute);
  margin: 0;
}

/* ============================================================
   FOOTER — minimal
   ============================================================ */
.iova-footer {
  background: var(--iova-ink);
  color: rgba(255,255,255,0.72);
  padding: 56px 24px 48px;
}
.iova-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.iova-footer .iova-wordmark { color: var(--iova-white); font-size: 24px; }
.iova-footer .iova-wordmark .o { color: var(--iova-orange); }
.iova-footer-tag {
  font-family: var(--iova-sans);
  font-size: 13px;
  letter-spacing: 1px;
}
.iova-footer-tag a {
  color: var(--iova-white);
  border-bottom: 1px solid var(--iova-orange);
}
.iova-footer-tag a:hover { color: var(--iova-orange); }

/* ============================================================
   Scroll-reveal
   ============================================================ */
.iova-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
  will-change: opacity, transform;
}
.iova-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .iova-reveal { opacity: 1; transform: none; }
  .iova-progress { transition: none; }
}

/* ============================================================
   Mobile tuning
   ============================================================ */
@media (max-width: 768px) {
  .iova-feature-frame { transform: translateY(-30px); }
  .iova-hero { padding: 80px 20px 56px; }
  .iova-article > p:first-of-type::first-letter {
    font-size: 3.5em;
    padding: 4px 10px 0 0;
  }
  .iova-cta-card { padding: 36px 28px; }
  .iova-footer-inner { flex-direction: column; text-align: center; gap: 14px; }
}
