/* ============================================
   NOVA NEWS — "Hibiscus" palette
   Ported from the Customizer's Additional CSS so the look lives in the
   theme. Loads after main.css. Light is the default look; the dark
   toggle keeps the original navy theme (only fonts, the colour strip
   and the crimson call-to-action buttons are shared).

   Palette: #8B0022 maroon · #E11D48 crimson · #58B0E6 blue · #8ED4F7 sky
            #D4F0FF ice · #4F8F2D green · #1B4D2E forest
   The colours are tokens: the light theme below re-maps the same
   --color-* / --glass-* names main.css already reads, so components
   follow without per-class colour rules.
   ============================================ */

/* ---- Palette + type (both themes) ---- */
:root {
  --ns-maroon:  #8B0022;
  --ns-crimson: #E11D48;
  --ns-blue:    #58B0E6;
  --ns-sky:     #8ED4F7;
  --ns-ice:     #D4F0FF;
  --ns-green:   #4F8F2D;
  --ns-forest:  #1B4D2E;
  --ns-tint:    #F4FBFF;
  --ns-muted:   #4A6355;   /* meta text, 6.5:1 on white */

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

h1, h2 { font-weight: 800; }
h3, h4 { font-weight: 700; }
::selection { background: var(--ns-ice); color: var(--ns-forest); }

/* Seven-colour strip across the very top of the page (fixed, so it never
   shifts the layout or the fixed header). */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 6px; pointer-events: none;
  background: linear-gradient(90deg,
    #8B0022 0 14.28%, #E11D48 14.28% 28.56%, #58B0E6 28.56% 42.84%,
    #8ED4F7 42.84% 57.12%, #D4F0FF 57.12% 71.4%, #4F8F2D 71.4% 85.68%,
    #1B4D2E 85.68% 100%);
}

/* Call-to-action buttons are crimson in both themes. */
.btn-solid {
  background: var(--ns-crimson); color: #fff; font-weight: 600;
  padding: .75rem 1.5rem; min-height: 44px; justify-content: center;   /* 44px touch target */
}
.btn-solid:hover { background: var(--ns-maroon); color: #fff; opacity: 1; }
/* The hero button sits on a photo; main.css makes it pale, here it is the primary CTA. */
.hero-feature .btn-solid { background: var(--ns-crimson); color: #fff; }
.hero-feature .btn-solid:hover { background: var(--ns-maroon); color: #fff; }

/* ============================================
   LIGHT THEME TOKENS
   ============================================ */
:root[data-theme="light"] {
  --color-bg:      #F7FCFF;
  --color-fg:      #1B4D2E;
  --color-fg-90:   rgba(27,77,46,.94);
  --color-fg-70:   rgba(27,77,46,.82);
  --color-fg-50:   rgba(27,77,46,.74);
  --color-fg-30:   rgba(27,77,46,.30);
  --color-fg-12:   rgba(27,77,46,.12);
  --color-fg-08:   rgba(27,77,46,.06);

  /* Cards: white with a pale-blue hairline, no glass blur or glow. */
  --glass-bg:            #ffffff;
  --glass-bg-active:     #D4F0FF;
  --glass-shadow-inset:  none;
  --glass-border-grad:   linear-gradient(#D4F0FF, #D4F0FF);
  --glass-border-width:  1.5px;
  --glass-blur: 0px;

  --wash-purple: rgba(88,176,230,.22);
  --wash-pink:   rgba(212,240,255,.7);
  --wash-cyan:   rgba(79,143,45,.12);

  --ring-top:   #ffffff;
  --ring-mid:   #8ED4F7;
  --ring-foot:  #58B0E6;
  --ring-edge:  rgba(255,255,255,.95);
  --ring-glow:  rgba(88,176,230,.25);
  --hero-bg-a:  #D4F0FF;
  --hero-bg-b:  #EAF7FF;
  --hero-bg-c:  #F7FCFF;
  --hero-wash:  rgba(88,176,230,.35);
  --rake:       rgba(255,255,255,.9);
  --star-opacity: 0;

  --shadow-card: 0 10px 30px rgba(27,77,46,.10);

  --nav-scrolled-bg:     rgba(255,255,255,.96);
  --nav-scrolled-shadow: none;
  --dropdown-bg:           rgba(255,255,255,.99);
  --overlay-search-bg:     rgba(247,252,255,.96);
  --overlay-mobile-nav-bg: rgba(247,252,255,.98);
  --sheen-edge: rgba(27,77,46,.3);
}

/* ============================================
   LIGHT THEME COMPONENTS
   ============================================ */

/* Header: white band with a hairline. */
:root[data-theme="light"] .site-header,
:root[data-theme="light"] .site-header.is-scrolled {
  background: #fff;
  border-bottom: 1px solid var(--ns-ice);
  box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
:root[data-theme="light"] .nav-capsule.glass { background: var(--ns-tint); }
:root[data-theme="light"] .btn-theme-toggle,
:root[data-theme="light"] .btn-search-icon,
:root[data-theme="light"] .menu-toggle {
  background: #fff; border: 1px solid var(--ns-ice); color: var(--ns-forest);
}
:root[data-theme="light"] .search-submit,
:root[data-theme="light"] .wp-block-search__button {
  background: var(--ns-forest); color: #fff;
}

/* Form fields */
:root[data-theme="light"] input[type="text"],
:root[data-theme="light"] input[type="email"],
:root[data-theme="light"] input[type="search"],
:root[data-theme="light"] input[type="url"] {
  background: var(--ns-tint); border: 1px solid var(--ns-sky); color: var(--ns-forest);
}
:root[data-theme="light"] input:focus,
:root[data-theme="light"] textarea:focus { outline: 2px solid var(--ns-blue); outline-offset: 2px; }

/* Links in running text */
:root[data-theme="light"] .article-body a {
  color: var(--ns-maroon);
  text-decoration-color: var(--ns-sky); text-decoration-thickness: 2px;
}
:root[data-theme="light"] .article-body a:hover { color: var(--ns-crimson); }

/* Section headings: crimson square marker in front of the title. */
:root[data-theme="light"] .section-title .accent-dot {
  order: -1; margin-left: 0;
  width: 12px; height: 12px; border-radius: 4px;
  background: var(--ns-crimson); box-shadow: none;
}
:root[data-theme="light"] .section-link { color: var(--ns-maroon); font-weight: 500; }
:root[data-theme="light"] .section-link:hover { color: var(--ns-crimson); }

/* Kicker above the home intro heading */
:root[data-theme="light"] .home-intro .hero-eyebrow { color: var(--ns-maroon); font-weight: 600; }
:root[data-theme="light"] .home-intro .hero-eyebrow::before { background: var(--ns-maroon); }

/* Category pills: dot + dark text; dot colour follows the category. */
:root[data-theme="light"] .cat-badge {
  align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--ns-tint); color: var(--ns-forest);
  border: 1px solid var(--ns-ice);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
}
:root[data-theme="light"] .cat-badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ns-blue);
}
:root[data-theme="light"] .cat-badge.cat-industries::before { background: var(--ns-green); }
:root[data-theme="light"] .cat-badge.cat-ai-work::before,
:root[data-theme="light"] .cat-badge.cat-ai-and-work::before { background: var(--ns-crimson); }
:root[data-theme="light"] .cat-badge.cat-world-in-numbers::before { background: var(--ns-blue); }

/* Cards: ice hairline, slight lift on hover */
:root[data-theme="light"] .post-card.glass.card,
:root[data-theme="light"] .explore-card.glass.card,
:root[data-theme="light"] .figure.glass.card,
:root[data-theme="light"] .widget.glass.card {
  box-shadow: none;
  transition: transform .2s ease, border-color .2s ease;
}
:root[data-theme="light"] .post-card.glass.card:hover { transform: translateY(-2px); }
:root[data-theme="light"] .figure-value { color: var(--ns-maroon); }
:root[data-theme="light"] .post-title a:hover { color: var(--ns-maroon); }
:root[data-theme="light"] .explore-link { color: var(--ns-maroon); }

/* Closing band: solid ice, no ring echoes */
:root[data-theme="light"] .close-band.glass.card {
  background: var(--ns-ice); border-radius: 32px;
}
:root[data-theme="light"] .close-band.glass.card::before,
:root[data-theme="light"] .close-band::after { display: none; }

/* Article: the post is one white card with room around the text */
:root[data-theme="light"] .single-layout > article {
  background: #fff;
  border: 1px solid var(--ns-ice);
  border-radius: 28px;
  padding: 48px 56px;
}
@media (max-width: 782px) {
  :root[data-theme="light"] .single-layout > article { padding: 24px 20px; }
}
.single .article-body > p,
.single .article-body > ul,
.single .article-body > ol,
.single .article-body > h2,
.single .article-body > h3,
.single .article-body > blockquote { max-width: 720px; }
.single .article-body > p { font-size: 18px; line-height: 1.75; }
.single .article-body h2 { margin-top: 56px; }
:root[data-theme="light"] .article-hero-caption,
:root[data-theme="light"] .article-body figcaption { color: var(--ns-muted); font-size: 13px; }

/* Tables: pale-blue header, zebra rows, rounded frame */
:root[data-theme="light"] .article-body thead th { background: var(--ns-ice); color: var(--ns-forest); }
:root[data-theme="light"] .article-body th,
:root[data-theme="light"] .article-body td { border-color: var(--ns-ice); }
:root[data-theme="light"] .article-body tbody tr:nth-child(even) td { background: #F9FDFF; }
:root[data-theme="light"] .article-body .table-scroll { border: 1px solid var(--ns-ice); border-radius: 16px; }
:root[data-theme="light"] .article-body tbody tr:hover td { background: var(--ns-tint); }

/* Table of contents */
:root[data-theme="light"] .article-toc { background: var(--ns-tint); border-color: var(--ns-ice); }
:root[data-theme="light"] .toc-title { color: var(--ns-maroon); }
:root[data-theme="light"] .toc-count { background: var(--ns-ice); color: var(--ns-forest); }
:root[data-theme="light"] .article-body .toc-list a { color: var(--ns-forest); text-decoration: none; }
:root[data-theme="light"] .article-body .toc-list a:hover { background: var(--ns-ice); color: var(--ns-maroon); }

/* Tags */
:root[data-theme="light"] .tag {
  background: var(--ns-tint); color: var(--ns-forest); border: 1px solid var(--ns-ice);
}
:root[data-theme="light"] .tag:hover { background: var(--ns-ice); }

/* Sidebar: category lists become wrapping pills */
:root[data-theme="light"] .sidebar .widget .wp-block-categories-list,
:root[data-theme="light"] .sidebar .widget_categories ul {
  flex-direction: row; flex-wrap: wrap; gap: 8px;
}
:root[data-theme="light"] .sidebar .widget .wp-block-categories-list li,
:root[data-theme="light"] .sidebar .widget_categories ul li { border: 0; padding: 0; margin: 0; }
:root[data-theme="light"] .sidebar .widget .wp-block-categories-list li a,
:root[data-theme="light"] .sidebar .widget_categories ul li a {
  display: inline-block; padding: 8px 14px; font-size: 13px;
  border-radius: 999px; background: var(--ns-tint); border: 1px solid var(--ns-ice);
  color: var(--ns-forest);
}
:root[data-theme="light"] .sidebar .widget .wp-block-categories-list li a:hover,
:root[data-theme="light"] .sidebar .widget_categories ul li a:hover { background: var(--ns-ice); }

/* Back-to-top */
:root[data-theme="light"] .scroll-top.glass {
  background: var(--ns-forest); color: #fff;
  width: 48px; height: 48px;
  /* White ring keeps it visible over the forest-green footer too. */
  border: 2px solid #fff; box-shadow: 0 4px 14px rgba(27,77,46,.25);
}
:root[data-theme="light"] .scroll-top.glass::before { display: none; }

/* ============================================
   FOOTER (forest green, both themes)
   Colour tokens are redefined inside the footer, so every component in
   it (links, labels, newsletter form) reads light-on-dark without
   per-element colour rules.
   ============================================ */
:root[data-theme="light"] .site-footer {
  --color-fg:    #ffffff;
  --color-fg-90: rgba(255,255,255,.92);
  --color-fg-70: rgba(212,240,255,.86);
  --color-fg-50: rgba(212,240,255,.78);
  --color-fg-30: rgba(212,240,255,.40);
  --color-fg-12: rgba(79,143,45,.65);
  --color-fg-08: rgba(212,240,255,.12);
  background: var(--ns-forest);
  color: var(--ns-ice);
  margin-top: var(--space-6);
}
:root[data-theme="light"] .site-footer .footer-col h4,
:root[data-theme="light"] .site-footer .footer-col-label {
  font-family: var(--font-mono); color: var(--ns-sky); letter-spacing: .14em;
}
:root[data-theme="light"] .site-footer .custom-logo-link {
  display: inline-block; background: #fff; border-radius: 16px; padding: 8px 14px;
}
:root[data-theme="light"] .site-footer input[type="email"] {
  background: #fff; color: var(--ns-forest); border-color: var(--ns-green);
}
:root[data-theme="light"] .site-footer input::placeholder { color: var(--ns-muted); opacity: 1; }
:root[data-theme="light"] .site-footer .newsletter-widget .wpforms-form button.wpforms-submit {
  background: var(--ns-crimson); color: #fff;
}
:root[data-theme="light"] .site-footer .newsletter-widget .wpforms-form button.wpforms-submit:hover { background: var(--ns-maroon); }
:root[data-theme="light"] .site-footer .footer-watermark {
  background: none; -webkit-text-fill-color: var(--ns-green); color: var(--ns-green); opacity: 1;
}
:root[data-theme="light"] .site-footer .social-icon:hover { background: rgba(212,240,255,.22); }
