/* SPDX-FileCopyrightText: 2026 PythonWoods <dev@pythonwoods.dev> */
/* SPDX-License-Identifier: Apache-2.0 */

/*
 * PythonWoods Design System — Zenzic product theme
 * Dark + Light mode with toggle support.
 *
 * Shared tokens (all PythonWoods sub-products):
 *   Header/nav background : #0d1117
 *   Body font             : Inter
 *   Code font             : JetBrains Mono
 *
 * Zenzic product accent   : #4f46e5 (indigo) / #38bdf8 (sky)
 */

/* ── Design tokens ────────────────────────────────────────────────────────── */

[data-md-color-scheme="slate"] {
  --md-primary-fg-color:             #0d1117;
  --md-primary-fg-color--light:      #161b22;
  --md-primary-fg-color--dark:       #010409;
  --md-primary-bg-color:             #e6edf3;
  --md-default-bg-color:             #0d1117;
  --md-default-bg-color--light:      #161b22;
  --md-default-bg-color--lighter:    #1c2128;
  --md-default-bg-color--lightest:   #21262d;
  --md-accent-fg-color:              #4f46e5;
  --md-accent-fg-color--transparent: #4f46e51a;
  --md-typeset-a-color:              #38bdf8;
  --md-code-bg-color:                #161b22;

  /* Zenzic custom tokens */
  --zz-muted-color:       #484f58;
  --zz-muted-color-hover: #8b949e;
  --zz-border-subtle:     #21262d;
  --zz-transition-fast:   0.15s ease;
}

/* ── Light mode tokens ────────────────────────────────────────────────────── */

[data-md-color-scheme="default"] {
  --md-primary-fg-color:             #4f46e5;
  --md-primary-fg-color--light:      #6366f1;
  --md-primary-fg-color--dark:       #3730a3;
  --md-primary-bg-color:             #ffffff;
  --md-default-bg-color:             #ffffff;
  --md-default-bg-color--light:      #f8fafc;
  --md-default-bg-color--lighter:    #f1f5f9;
  --md-default-bg-color--lightest:   #e2e8f0;
  --md-accent-fg-color:              #4f46e5;
  --md-accent-fg-color--transparent: #4f46e51a;
  --md-typeset-a-color:              #4f46e5;
  --md-code-bg-color:                #f8fafc;

  /* Zenzic custom tokens */
  --zz-muted-color:       #94a3b8;
  --zz-muted-color-hover: #475569;
  --zz-border-subtle:     #e2e8f0;
  --zz-transition-fast:   0.15s ease;
}


/* ── Breadcrumb (navigation.path) ────────────────────────────────────────── */

/* Ancestor crumbs — interactive, subdued */
.md-path__item a {
  color: var(--zz-muted-color);
  text-decoration: none;
  transition: color var(--zz-transition-fast);
}

.md-path__item a:hover {
  color: var(--md-typeset-a-color);
}

/* Section crumb with no dedicated index — plain text, not a link */
.md-path__item--section {
  color: var(--zz-muted-color);
}

/* Current page crumb — no link, accent color, slightly heavier weight */
.md-path__item--current {
  color: var(--md-accent-fg-color);
}

/* Separator chevrons — keep muted */
.md-path__item + .md-path__item::before {
  color: var(--zz-muted-color);
  opacity: 0.6;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.md-header {
  background-color: #0d1117;
  color: #e6edf3;
}

[data-md-color-scheme="default"] .md-header {
  background-color: #ffffff;
  color: #0f172a;
}

.md-header {
  border-bottom: 1px solid var(--zz-border-subtle);
}

/* ── Navbar logo swap ─────────────────────────────────────────────────────── */

[data-md-color-scheme="slate"] .md-header__button.md-logo img,
[data-md-color-scheme="default"] .md-header__button.md-logo img {
  content: url('../brand/svg/zenzic-icon.svg');
}

/* ── Navigation: sidebar active state ────────────────────────────────────── */

/* dark: indigo-300 (#a5b4fc) — light enough on dark bg, no sky mismatch */
.md-nav__item--active > .md-nav__link {
  color: #818cf8;
}

.md-nav--secondary .md-nav__item--active > .md-nav__link {
  color: #818cf8;
}

/* light mode: standard indigo */
[data-md-color-scheme="default"] .md-nav__item--active > .md-nav__link {
  color: #4f46e5;
}

[data-md-color-scheme="default"] .md-nav--secondary .md-nav__item--active > .md-nav__link {
  color: #4f46e5;
}

/* ── Navigation: hide site title from sidebar ─────────────────────────────── */

/* "Zenzic" heading injected by Material at the top of the sidebar drawer */
.md-nav--primary > .md-nav__title {
  display: none;
}

/* ── Navigation: sidebar spacing and icon rendering ───────────────────────── */

/* Extra vertical breathing room between sidebar items */
.md-nav__item {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}

/* MkDocs Material sets fill:currentColor on all .md-icon svg, which turns
 * stroke-based Lucide icons into filled shapes. Override globally:
 * restore fill:none so the SVG stroke attributes are respected. */
.md-nav__link .md-icon svg,
.md-nav__link svg,
.md-nav__icon svg,
.md-typeset svg,
.md-content__inner svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.5 !important;
}

/* ── Marketing pages (home.html template) ─────────────────────────────────── */

/* Suppress the auto-injected <h1> on pages that contain .zz-hero.
 * :has() is supported in all modern browsers (Chrome 105+, Firefox 121+, Safari 15.4+). */
.md-content__inner:has(.zz-hero) > h1:first-child {
  display: none;
}

/* Remove ALL Material spacing so .zz-hero is truly full-bleed */
.md-content__inner:has(.zz-hero) {
  padding: 0;
  margin: 0 auto;
}

.md-content:has(.zz-hero) {
  margin-top: 0;
  padding: 0;
}

.md-main:has(.zz-hero) .md-main__inner {
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
}

.md-main:has(.zz-hero) {
  padding-top: 0;
}

/* Kill the grid gap Material reserves for the sidebar on hero pages */
.md-main:has(.zz-hero) .md-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.md-grid:has(.zz-hero) {
  margin: 0;
  max-width: 100%;
}

/* ── Landing page hero (Option C — dark full-bleed band) ─────────────────── */

/* Full-bleed hero band — theme-aware colors */
.zz-hero {
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  /* Flex column, centered */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

[data-md-color-scheme="slate"] .zz-hero {
  background:
    radial-gradient(ellipse 100% 60% at 50% 30%, rgba(79, 70, 229, 0.18) 0%, transparent 100%),
    linear-gradient(180deg, #0d1117 0%, #0f1320 55%, #0d1117 100%);
  color: #e6edf3;
}

[data-md-color-scheme="default"] .zz-hero {
  background:
    radial-gradient(ellipse 100% 60% at 50% 30%, rgba(79, 70, 229, 0.08) 0%, transparent 100%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  color: #0f172a;
  border-bottom: 1px solid var(--zz-border-subtle);
}

.zz-hero__logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* pymdownx wraps the logo img in a <p> — strip its margin */
.zz-hero p:has(.zz-hero__logo),
.zz-hero p:first-child {
  margin: 0;
}

.zz-hero__tagline {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #94a3b8;
  margin: 0;
  max-width: 520px;
  font-weight: 400;
}

[data-md-color-scheme="default"] .zz-hero__tagline {
  color: #64748b;
}

.zz-hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  /* pymdownx wraps links in a <p> — override paragraph margin */
  margin: 0;
}

/* CTA buttons — reset Material's global margin */
.zz-hero .md-button {
  margin-top: 0;
  margin-bottom: 0;
}

/* Primary CTA on dark hero background */
.zz-hero .md-button--primary {
  background-color: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.zz-hero .md-button--primary:hover,
.zz-hero .md-button--primary:focus {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Secondary CTA on dark background */
.zz-hero .md-button:not(.md-button--primary) {
  color: #e6edf3;
  border-color: #30363d;
}

.zz-hero .md-button:not(.md-button--primary):hover {
  color: #ffffff;
  border-color: #8b949e;
  background-color: rgba(255, 255, 255, 0.06);
}

[data-md-color-scheme="default"] .zz-hero .md-button:not(.md-button--primary) {
  color: #475569;
  border-color: #e2e8f0;
}

[data-md-color-scheme="default"] .zz-hero .md-button:not(.md-button--primary):hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background-color: rgba(0, 0, 0, 0.03);
}

/* Inline command box — replaces fenced code block */
.zz-hero__cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875rem;
  white-space: nowrap;
}

.zz-hero__cmd code {
  background: none;
  color: #58a6ff;
  padding: 0;
  font-size: inherit;
}

.zz-hero__cmd-comment {
  color: #484f58;
  font-size: 0.8rem;
}

[data-md-color-scheme="default"] .zz-hero__cmd {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-md-color-scheme="default"] .zz-hero__cmd code {
  color: #4f46e5;
}

[data-md-color-scheme="default"] .zz-hero__cmd-comment {
  color: #94a3b8;
}

@media screen and (max-width: 59.9375em) {
  .zz-hero {
    padding: 2.5rem 1rem 2.5rem;
    gap: 1.25rem;
  }

  .zz-hero__logo {
    max-width: 200px;
  }
}

/* Screenshot — below the hero band, full-width contained */
.zz-hero__screenshot-wrap {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 0 1.5rem 3rem;
}

.zz-hero__screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.28);
}

/* Hide the <hr> separators on the home page — spacing handled by sections */
.md-content__inner:has(.zz-hero) > hr {
  border: none;
  border-top: 1px solid var(--zz-border-subtle);
  margin: 0;
}

/* Feature cards — layout and containment */
.zz-features {
  max-width: 960px;
  margin: 3.5rem auto !important;
  padding: 0 1.5rem;
}

/* Feature cards — 2-column grid for better breathing room */
.zz-features.grid.cards,
.zz-features .grid.cards {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* Feature cards — individual card styling */
.zz-features li {
  background: var(--md-code-bg-color);
  border: 1px solid transparent !important;
  border-radius: 0.5rem;
  padding: 1.25rem;
  transition: transform var(--zz-transition-fast), border-color var(--zz-transition-fast), box-shadow var(--zz-transition-fast);
  min-height: 120px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  /* Push code block to bottom via flex */
  display: flex !important;
  flex-direction: column !important;
}

/* Reduce card text size — target p directly to beat Material specificity */
.zz-features li p {
  font-size: 0.78rem !important;
  line-height: 1.6;
  margin: 0.3rem 0;
}

/* Card title — subtle indigo tint, no bold */
.zz-features li p:first-child strong {
  color: #818cf8;
  font-weight: 500;
}

[data-md-color-scheme="default"] .zz-features li p:first-child strong {
  color: #6366f1;
  opacity: 0.85;
  font-weight: 500;
}

/* Hover — border appears, lighter lift */
.zz-features li:hover {
  transform: translateY(-2px);
  border-color: #4f46e5 !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}

[data-md-color-scheme="default"] .zz-features li {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="default"] .zz-features li:hover {
  /* softer, no neon: use a semi-transparent indigo */
  border-color: rgba(79, 70, 229, 0.45) !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}


/* Inline command tags within cards */
.zz-card-cmd {
  margin-top: 1rem;
  display: flex;
}

.zz-card-cmd code {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: #38bdf8 !important;
  border-radius: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem !important;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

[data-md-color-scheme="default"] .zz-card-cmd code {
  background: rgba(79, 70, 229, 0.05);
  border-color: rgba(79, 70, 229, 0.12);
  color: #4f46e5 !important;
}

@media screen and (max-width: 76.1875em) {
  .zz-features.grid.cards,
  .zz-features .grid.cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 44.9375em) {
  .zz-features.grid.cards,
  .zz-features .grid.cards {
    grid-template-columns: 1fr !important;
  }
}

/* Score section — centered, contained width */
/* Score section — elevated card, generous top spacing */
.zz-score-section {
  max-width: 640px;
  margin: 3.5rem auto !important;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--md-code-bg-color);
  border: 1px solid var(--zz-border-subtle);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

[data-md-color-scheme="default"] .zz-score-section {
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

/* Score section text — reduced to match card scale */
.zz-score-section p {
  font-size: 0.78rem !important;
  line-height: 1.7;
}

.zz-score-section h2 {
  margin-top: 0;
  font-size: 0.95rem !important;
}

/* Quality Score section — smaller code font to avoid scrollbar */
.zz-score-section .highlight code,
.zz-score-section pre code {
  font-size: 0.72rem !important;
  line-height: 1.55;
}

/* Trust bar — minimal footer note */
.zz-trust-section {
  text-align: center;
  padding: 0.75rem 1rem 1rem;
  font-size: 0.65rem;
  color: var(--zz-muted-color);
  max-width: 960px;
  margin: 0 auto;
}

.zz-trust-section strong {
  color: var(--md-default-fg-color);
  opacity: 0.9;
}

.zz-trust-section a {
  color: var(--md-typeset-a-color);
  text-decoration: none;
}

/* Primary CTA — dark mode contrast override (outside hero, e.g. docs pages) */
[data-md-color-scheme="slate"] .md-typeset .md-button--primary {
  background-color: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

[data-md-color-scheme="slate"] .md-typeset .md-button--primary:hover,
[data-md-color-scheme="slate"] .md-typeset .md-button--primary:focus {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Watermark PythonWoods */
.pw-watermark {
  text-align: center;
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 0.75rem;
  color: var(--zz-muted-color);
  letter-spacing: 0.02em;
}

.pw-watermark a {
  color: var(--zz-muted-color);
  text-decoration: none;
  border-bottom: 1px solid var(--zz-border-subtle);
  transition: color var(--zz-transition-fast);
}

.pw-watermark a:hover {
  color: var(--zz-muted-color-hover);
  border-bottom-color: var(--zz-muted-color);
}


/* ── Footer copyright ─────────────────────────────────────────────────────── */

.md-copyright__highlight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.md-copyright__highlight a:not(.md-footer-pw-icon) {
  color: var(--zz-muted-color);
  text-decoration: none;
  border-bottom: 1px solid var(--zz-border-subtle);
  transition: color var(--zz-transition-fast);
}

.md-copyright__highlight a:not(.md-footer-pw-icon):hover {
  color: var(--zz-muted-color-hover);
}

.md-footer-pw-icon {
  display: inline-flex;
  align-items: center;
  color: var(--zz-muted-color);
  text-decoration: none;
  transition: color var(--zz-transition-fast);
}

.md-footer-pw-icon:hover {
  color: var(--zz-muted-color-hover);
}

/* Unifica le due fasce del footer rimuovendo lo stacco di colore e aggiunge styling framing */
.md-footer-meta.md-typeset {
  background-color: var(--md-footer-bg-color);
}

.md-footer {
  border-top: 1px solid var(--zz-border-subtle);
}
