/* =========================================================
   Neon Coast skin for the Premium Plus base theme
   Loaded after the base styles. Uses the theme's CSS custom
   properties; neon-only values come from style.css
   (--neon-accent, --neon-accent-2, --neon-header).
   ========================================================= */

/* ---------- Base ---------- */
body {
  background-color: var(--primary-bg-color);
}

h1, h2, h3, h4,
.h1, .h2, .h3, .h4 {
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 400;
}

::selection { background: var(--primary-color); color: #1A0B1F; }

:focus-visible { outline: 2px solid var(--neon-accent); outline-offset: 2px; }

.neon-kicker {
  margin: 0 0 12px;
  font-family: "Yellowtail", cursive;
  font-size: 34px;
  line-height: 1.2;
  color: var(--neon-accent);
  text-transform: none;
}

/* Buttons: dark text on hot pink */
.btn--primary,
.btn--primary:visited {
  color: #1A0B1F;
  font-weight: 700;
}
.btn--primary:hover,
.btn--primary:focus {
  color: #1A0B1F;
  box-shadow: 0 0 24px color-mix(in srgb, var(--primary-color) 45%, transparent);
}
.btn--secondary,
.btn--secondary:visited { color: #1A0B1F; }

/* ---------- Header: frosted glass ---------- */
/* The P+ header is sticky; the hero and page headings slide up under it so the glass has the scene behind it. */
body { --neon-header-h: 88px; }
@media (max-width: 767px) { body { --neon-header-h: 72px; } }

.header,
html[dir] .header {
  background-color: color-mix(in srgb, var(--neon-header) 50%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(237, 231, 255, 0.12);
}
html[dir] .header.is-scrolled {
  box-shadow: 0 8px 32px rgba(8, 3, 20, 0.35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header,
  html[dir] .header { background-color: var(--neon-header); }
}
.header .dropdown__menuitem,
.header__menu a {
  color: var(--primary-text-color);
}
.header .dropdown__menuitem:hover,
.header__menu a:hover { color: #FFFFFF; }

/* ---------- Scene backgrounds (welcome, page heading, CTA) ---------- */
.welcome__bg.neon-bg { z-index: -1; overflow: hidden; }
.welcome__bg.neon-bg .neon-scene {
  object-fit: cover;
  object-position: center bottom;
  width: 100%;
  height: 100%;
  opacity: 1;
}

/* The scene spans the full section, not just the container */
.welcome:has(.neon-bg),
.page-heading:has(.neon-bg),
.cta:has(.neon-bg) .cta__section {
  position: relative;
  isolation: isolate;
}
.welcome:has(.neon-bg) .welcome__section,
.welcome:has(.neon-bg) .welcome__container,
.page-heading:has(.neon-bg) > .container,
.cta:has(.neon-bg) .cta__section > .container {
  position: static;
}
.welcome .welcome__bg.neon-bg,
.page-heading .welcome__bg.neon-bg,
.cta .welcome__bg.neon-bg {
  display: block;
  z-index: -1;
  max-width: none;
}

/* Welcome (home) and page headings sit under the glass header */
.welcome:has(.neon-bg),
.page-heading:has(.neon-bg) {
  margin-top: calc(-1 * var(--neon-header-h));
  padding-top: var(--neon-header-h);
}

/* Welcome (home) */
.welcome:has(.neon-bg) {
  background: #0C0518;
}
[dir] .welcome--type-2 .neon-kicker { text-align: center; }
.welcome:has(.neon-bg) .welcome__content {
  padding-bottom: 220px;
}.welcome:has(.neon-bg) .welcome__content .h1 {
  color: #FFFFFF;
  text-shadow: 0 2px 24px rgba(12, 5, 24, 0.6);
}
/* Design: Anton 72px, line-height 1, letter-spacing 1px. Scales down on small screens;
   [dir] beats the base theme's mobile heading-3 size. */
[dir] .welcome:has(.neon-bg) .welcome__content .h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1;
  letter-spacing: 1px;
}
.welcome:has(.neon-bg) .welcome__image { display: none; }

/* Search boxes */
html[dir].ui-dark .welcome form.search input[type="search"],
html[dir].ui-dark .page-heading form.search input[type="search"],
html[dir].ui-dark .modal-search form.search input[type="search"],
.welcome form.search input[type="search"],
.page-heading form.search input[type="search"],
.modal-search form.search input[type="search"] {
  background-color: var(--neon-header);
  color: #FFFFFF;
  border: 2px solid var(--primary-color);
}
.welcome form.search input[type="search"] {
  box-shadow: 0 0 28px color-mix(in srgb, var(--primary-color) 45%, transparent);
}
form.search input[type="search"]::placeholder { color: var(--secondary-text-color); }

/* Page heading (inner pages) */
.page-heading:has(.neon-bg) {
  background-color: #160C2C;
}
/* No hard edge under the heading: the purple scene fades into the page background.
   z-index -1 puts the fade above the scene (also -1, earlier in the DOM) and below the text. */
.page-heading:has(.neon-bg)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--primary-bg-color-always));
}

/* Inner pages: the banner is a decorative strip; breadcrumbs and title open the page content
   (design/mockups/Article.html). Templates put them in .neon-page-head (article: .neon-article-*).
   Author and updated date are left out of the article template. */
[dir] .page-heading--strip {
  padding-bottom: 0;
  min-height: calc(var(--neon-header-h) + 140px);
  margin-bottom: 32px;
}
@media (max-width: 767px) {
  [dir] .page-heading--strip { min-height: calc(var(--neon-header-h) + 96px); margin-bottom: 24px; }
}
[dir] .neon-article-crumbs,
[dir] .neon-page-head .page-heading__breadcrumbs { margin-bottom: 32px; }
[dir] .neon-page-head .page-heading__breadcrumbs:empty { margin-bottom: 0; }
.neon-article-crumbs .breadcrumbs,
.neon-page-head .breadcrumbs { font-size: 14px; }
.neon-article-crumbs .breadcrumbs li,
.neon-page-head .breadcrumbs li { color: var(--secondary-text-color); }
.neon-article-crumbs .breadcrumbs a,
.neon-page-head .breadcrumbs a { color: var(--primary-text-color); }
.neon-article-crumbs .breadcrumbs a:hover,
.neon-article-crumbs .breadcrumbs a:focus,
.neon-page-head .breadcrumbs a:hover,
.neon-page-head .breadcrumbs a:focus { color: var(--neon-accent); }
[dir] .neon-page-head { margin-bottom: 32px; }
[dir] .neon-page-head .page-heading__title {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: 1px;
  color: var(--primary-text-color);
}
.neon-article-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}
[dir] .neon-article-head {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}
[dir] .neon-article-head__title {
  flex: 1 1 320px;
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: 1px;
  color: var(--primary-text-color);
}
.neon-article-head__subscribe { flex: none; }

/* CTA */
.cta .pwr-shape-divider__svg path { fill: var(--primary-bg-color); }
.cta:has(.neon-bg) .cta__title { color: #FFFFFF; }
.cta:has(.neon-bg) .cta__subtitle { color: var(--primary-text-color); }
.cta:has(.neon-bg) .cta__image { display: none; }
/* The CTA scene fades into the footer colour (--neon-header) at the bottom, and the footer
   drops its top border on those pages, so the two read as one block. */
.cta:has(.neon-bg) .cta__section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--neon-header));
}
html[dir] body:has(.cta .neon-bg) .footer { border-top: 0; }

/* ---------- Home blocks ---------- */
/* Category cards right after the scene overlap its bottom edge. Below the scene, the section
   fades from the dune colour (#0B0514, see bin/neon/scene.py) to the page background. */
.welcome:has(.neon-bg) + .category-blocks { --neon-cat-overlap: 160px; }
@media (max-width: 767px) {
  .welcome:has(.neon-bg) + .category-blocks { --neon-cat-overlap: 96px; }
}
[dir] .welcome:has(.neon-bg) + .category-blocks {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--neon-cat-overlap));
  padding-top: 0;
  background: linear-gradient(to bottom,
    transparent var(--neon-cat-overlap),
    #0B0514 var(--neon-cat-overlap),
    var(--primary-bg-color-always) 100%);
}
.welcome:has(.neon-bg) + .category-blocks .category-blocks__link {
  box-shadow: 0 18px 40px rgba(12, 5, 24, 0.55);
}
.welcome:has(.neon-bg) + .category-blocks .category-blocks__link:hover,
.welcome:has(.neon-bg) + .category-blocks .category-blocks__link:focus {
  box-shadow: 0 18px 40px rgba(12, 5, 24, 0.55), 0 0 28px color-mix(in srgb, var(--primary-color) 22%, transparent);
}
.category-blocks__link {
  background-color: var(--secondary-bg-color);
  border: 1px solid var(--border-color);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.category-blocks__link:hover,
.category-blocks__link:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 28px color-mix(in srgb, var(--primary-color) 22%, transparent);
  transform: translateY(-2px);
}
.category-blocks__title { color: #FFFFFF; }
/* Hover keeps the card dark so the neon icons stay visible (base theme fills it pink) */
html[dir] .category-blocks--type-1 .category-blocks__link:hover,
html[dir] .category-blocks--type-1 .category-blocks__link:focus {
  background-color: var(--secondary-bg-color);
}
html[dir] .category-blocks__link:hover .category-blocks__title { color: #FFFFFF; }
/* Neon line icons (assets/neon-cat-<category id>.svg) */
.category-blocks__image.neon-cat-icon {
  width: 96px;
  height: 96px;
  border-radius: 0;
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.18));
  transition: filter .2s, transform .2s;
}
.category-blocks__link:hover .neon-cat-icon,
.category-blocks__link:focus .neon-cat-icon {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.35));
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .category-blocks__link:hover .neon-cat-icon { transform: none; }
}

.promoted .articles__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.promoted .articles__link,
.promoted .articles__link:visited { color: var(--primary-text-color); font-weight: 600; }
.promoted .articles__link:hover { color: #FFFFFF; }
.promoted__nav-link { color: var(--primary-text-color); }
.promoted__nav-link.is-active,
.promoted__nav-link:hover { color: #FFFFFF; }
.promoted__body {
  border: 1px solid var(--neon-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--neon-accent) 18%, transparent);
}

/* ---------- Article content (P+ formatting tools) ---------- */
/* Neon fills are bright, so text on them must be dark to stay readable */
[data-plugin-formatting] .callout:not(.callout--type-2):not(.callout--type-4):not(.callout--type-5):not(.callout--type-6)[class*="callout--style-"]:not(.callout--style-gray) {
  color: #1A0B1F;
}
[data-plugin-formatting] .table thead,
[data-plugin-formatting] .table tfoot,
[data-plugin-formatting] .tabs--style-primary .tabs__links a,
[data-plugin-formatting] .tabs--style-primary .tabs__links a:hover,
[data-plugin-formatting] .tabs--style-primary .tabs__links a.is-active,
[data-plugin-formatting] .tabs--style-secondary .tabs__links a,
[data-plugin-formatting] .tabs--style-secondary .tabs__links a:hover,
[data-plugin-formatting] .tabs--style-secondary .tabs__links a.is-active,
[data-plugin-formatting] div.accordion--style-primary > .spoiler > .spoiler__title,
[data-plugin-formatting] div.accordion--style-primary > .spoiler > .spoiler__title:hover,
[data-plugin-formatting] div.accordion--style-primary > .spoiler > .spoiler__title.is-active,
[data-plugin-formatting] div.accordion--style-secondary > .spoiler > .spoiler__title,
[data-plugin-formatting] div.accordion--style-secondary > .spoiler > .spoiler__title:hover,
[data-plugin-formatting] div.accordion--style-secondary > .spoiler > .spoiler__title.is-active {
  color: #1A0B1F;
}
[data-plugin-formatting] .table--style-gray thead,
[data-plugin-formatting] .table--style-gray tfoot {
  color: var(--primary-text-color);
}
.markdown h2, .markdown h3, .markdown h4 { color: var(--neon-accent-2); }
.markdown blockquote,
.markdown .quote { border-color: var(--neon-accent); }

/* ---------- Footer ---------- */
.footer,
html[dir] .footer--style-1,
html[dir] .footer--style-2,
html[dir] .footer--style-3 {
  background-color: var(--neon-header);
  border-top: 1px solid var(--border-color);
}
.footer__social a { color: var(--secondary-text-color); }
.footer__social a:hover { color: var(--neon-accent); }

@media (prefers-reduced-motion: reduce) {
  .category-blocks__link { transition: none; }
  .category-blocks__link:hover { transform: none; }
}
