@import url('./neon-shared.css');

/* Neon Dusk — main site theme (violet-teal sunset, stacked hero, duo grid) */
body.theme-neon-dusk {
  --neon-bg-base: #080b18;
  --neon-accent-link: #fcd34d;
  --link-underline: rgba(252, 211, 77, 0.5);
  --neon-eyebrow: #c4b5fd;
  --neon-title-grad: linear-gradient(125deg, #fff 15%, #c4b5fd 55%, #fed7aa 100%);
  --neon-btn: linear-gradient(90deg, #7c3aed 0%, #e66037 100%);
  --neon-btn-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
  --neon-visual-glow: 0 0 65px rgba(167, 139, 250, 0.4);
  --neon-cell-radius: 24px;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.22);

  position: relative;
  isolation: isolate;
  background-color: var(--neon-bg-base);
}

/* Scroll-driven background — one CSS variable on .dusk-bg, updated on scroll */
body.theme-neon-dusk .dusk-bg {
  --dusk-p: 0;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  contain: strict;
  background-color: var(--neon-bg-base);
  background-image:
    radial-gradient(
      ellipse 90% 70% at calc(8% + var(--dusk-p) * 20%) calc(12% + var(--dusk-p) * 6%),
      rgba(49, 46, 129, 0.95) 0%,
      transparent 52%
    ),
    radial-gradient(
      ellipse 85% 65% at calc(92% - var(--dusk-p) * 14%) calc(88% - var(--dusk-p) * 12%),
      rgba(230, 96, 55, 0.72) 0%,
      transparent 48%
    ),
    radial-gradient(
      ellipse 75% 55% at calc(12% + var(--dusk-p) * 8%) calc(92% - var(--dusk-p) * 16%),
      rgba(4, 112, 107, 0.78) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 65% 50% at calc(58% + var(--dusk-p) * 10%) calc(38% + var(--dusk-p) * 8%),
      rgba(124, 58, 237, 0.42) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 45% 35% at calc(78% - var(--dusk-p) * 10%) calc(18% + var(--dusk-p) * 12%),
      rgba(251, 146, 60, 0.28) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 70% 45% at calc(50% + var(--dusk-p) * 12%) calc(35% - var(--dusk-p) * 10%),
      rgba(196, 181, 253, 0.14) 0%,
      transparent 58%
    ),
    linear-gradient(
      calc(155deg + var(--dusk-p) * 22deg),
      #141238 0%,
      #062f2d 32%,
      #1a0d3b 58%,
      #3b1a10 82%,
      #1a0a2e 100%
    );
}

body.theme-neon-dusk .dusk-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 100% at 50% 50%, transparent 40%, rgba(4, 6, 18, 0.55) 100%);
}

body.theme-neon-dusk .slant-hero__visual {
  max-width: 280px;
  padding: 0.35rem;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.22);
}

body.theme-neon-dusk .slant-hero__visual .hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  transform: scale(1.72);
}

body.theme-neon-dusk .neon-cell.glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

body.theme-neon-dusk .site-header {
  background: rgba(8, 11, 24, 0.45);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-neon-dusk .site-footer {
  background: rgba(8, 11, 24, 0.5);
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Header logos — same glass orb as slant-hero__visual */
body.theme-neon-dusk .header-brand--studio.company-mark--header .company-logo-disc,
body.theme-neon-dusk .header-brand--product .brand-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    var(--neon-visual-glow),
    inset 0 0 24px rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.1);
}

body.theme-neon-dusk .header-brand--studio.company-mark--header .company-logo-disc {
  width: 54px;
  height: 54px;
}

body.theme-neon-dusk .header-brand--product .brand-logo-frame {
  width: 52px;
  height: 52px;
}

body.theme-neon-dusk .header-brand--studio.company-mark--header .company-logo-disc img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0;
  background: none;
  border-radius: 0;
  box-sizing: border-box;
  transform: scale(0.9);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

body.theme-neon-dusk .header-brand--product .brand-logo-frame .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 0;
  background: none;
  border-radius: 0;
  box-sizing: border-box;
  transform: scale(1.82);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

body.theme-neon-dusk .brand:hover .brand-logo-frame {
  box-shadow:
    var(--neon-visual-glow),
    inset 0 0 28px rgba(255, 255, 255, 0.1),
    0 10px 36px rgba(0, 0, 0, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

body.theme-neon-dusk .site-footer .company-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

/* Landing section headings */
body.theme-neon-dusk .section-head--landing {
  padding: 0 1.5rem;
  margin-bottom: 1.25rem;
}

body.theme-neon-dusk .section-head--landing h2 {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.15);
}

body.theme-neon-dusk .section-head--landing p {
  color: var(--ink-secondary);
}

body.theme-neon-dusk .neon-grid--resources {
  padding-top: 0;
}

/* CleanMyMac-style feature panels — slogan + image alternating sides */
body.theme-neon-dusk .feature-showcase {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.theme-neon-dusk .feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

body.theme-neon-dusk .feature-panel--reverse {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

body.theme-neon-dusk .feature-panel--reverse .feature-panel__copy {
  order: 2;
}

body.theme-neon-dusk .feature-panel--reverse .feature-panel__visual {
  order: 1;
}

body.theme-neon-dusk .feature-panel__headline {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}

body.theme-neon-dusk .feature-panel__body {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.55;
  color: var(--ink-secondary);
}

body.theme-neon-dusk .feature-panel__visual {
  position: relative;
}

body.theme-neon-dusk .feature-panel__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
  body.theme-neon-dusk .feature-panel,
  body.theme-neon-dusk .feature-panel--reverse {
    grid-template-columns: 1fr;
  }

  body.theme-neon-dusk .feature-panel--reverse .feature-panel__copy,
  body.theme-neon-dusk .feature-panel--reverse .feature-panel__visual {
    order: unset;
  }

  body.theme-neon-dusk .feature-panel__visual {
    order: -1;
  }

  body.theme-neon-dusk .feature-panel__body {
    max-width: none;
  }
}

/* Content pages (docs, support, privacy, terms) */
body.theme-neon-dusk main:not(:has(.slant-hero)) {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: var(--neon-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
}

/* Guide / KB section headings — vivid gradient + divider between articles */
body.theme-neon-dusk main:not(:has(.slant-hero)) h2[id] {
  margin: 3.25rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  background: var(--neon-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  scroll-margin-top: 88px;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) h2#start {
  margin-top: 2rem;
  padding-top: 0;
  border-top: none;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e9d5ff;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) p,
body.theme-neon-dusk main:not(:has(.slant-hero)) li {
  color: var(--ink-secondary);
  line-height: 1.55;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) .meta {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.58);
}

body.theme-neon-dusk main:not(:has(.slant-hero)) ul,
body.theme-neon-dusk main:not(:has(.slant-hero)) ol {
  padding-left: 1.35rem;
}

body.theme-neon-dusk main:not(:has(.slant-hero)) code {
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e9d5ff;
}

/* Tables — override light --surface from modern-base (th was rendering white) */
body.theme-neon-dusk main table {
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

body.theme-neon-dusk main th,
body.theme-neon-dusk main td {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

body.theme-neon-dusk main th {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

body.theme-neon-dusk main td {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

/* Content links — clearly clickable, distinct from body text */
body.theme-neon-dusk main a:not(.btn):not(.header-brand):not(.company-mark):not(.brand),
body.theme-neon-dusk .kb-toc a,
body.theme-neon-dusk .neon-cell a,
body.theme-neon-dusk .site-footer a {
  color: var(--neon-accent-link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

body.theme-neon-dusk main a:not(.btn):not(.header-brand):not(.company-mark):not(.brand):hover,
body.theme-neon-dusk .kb-toc a:hover,
body.theme-neon-dusk .neon-cell a:hover,
body.theme-neon-dusk .site-footer a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.65);
}

body.theme-neon-dusk .site-nav a {
  text-decoration: none;
  font-weight: 400;
}

body.theme-neon-dusk .site-nav a.active {
  color: #fff;
  font-weight: 500;
}

/* Knowledge base — table of contents + callout */
body.theme-neon-dusk .kb-callout {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(196, 181, 253, 0.35);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

body.theme-neon-dusk .kb-callout strong {
  color: #fff;
}

body.theme-neon-dusk .kb-disclaimer {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  border-radius: 14px;
  background: rgba(230, 96, 55, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

body.theme-neon-dusk .kb-disclaimer > strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #fde68a;
  font-size: 1.02rem;
}

body.theme-neon-dusk .kb-disclaimer strong {
  color: #fde68a;
  font-weight: 600;
}

body.theme-neon-dusk .kb-disclaimer p {
  margin: 0 0 0.75rem;
}

body.theme-neon-dusk .kb-disclaimer p:last-child {
  margin-bottom: 0;
}

body.theme-neon-dusk .kb-disclaimer ol {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

body.theme-neon-dusk .kb-disclaimer li {
  margin-bottom: 0.35rem;
}

body.theme-neon-dusk .kb-toc {
  margin: 2rem 0 2.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body.theme-neon-dusk .kb-toc__title {
  margin: 0 0 0.75rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6) !important;
}

body.theme-neon-dusk .kb-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

body.theme-neon-dusk .kb-toc li {
  margin: 0 0 0.4rem;
  break-inside: avoid;
}


@media (max-width: 640px) {
  body.theme-neon-dusk .kb-toc ol {
    columns: 1;
  }
}

/* Landing: full-bleed sections inside main */
body.theme-neon-dusk > main {
  max-width: none;
  margin: 0;
  padding: 0;
}
