/* PyAdminer marketing site — aligned with app theme (static/css/styles.css) */

:root {
  --py-bg: #f4f4f5;
  --py-surface: #ffffff;
  --py-border: #e4e4e7;
  --py-text: #18181b;
  --py-muted: #71717a;
  --py-primary: #3f3f46;
  --py-primary-hover: #27272a;
  --py-accent: #0d9488;
  --py-accent-soft: #ccfbf1;
  --py-radius: 10px;
  --py-radius-sm: 6px;
  --py-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --py-shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
  --py-max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--py-text);
  background: var(--py-bg);
}

/* “Skip to main content” — hidden until Tab focus (screen readers / keyboard users). */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  background: var(--py-primary);
  color: #fff !important;
  font-weight: 600;
  border-radius: var(--py-radius-sm);
  outline: 2px solid var(--py-accent);
  outline-offset: 2px;
  text-decoration: none;
}

a {
  color: var(--py-primary);
  text-decoration: none;
}

a:hover {
  color: var(--py-primary-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: 100%;
  max-width: var(--py-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: var(--py-surface);
  border-bottom: 1px solid var(--py-border);
  box-shadow: var(--py-shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.site-logo-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-logo-row img {
  height: 40px;
  width: auto;
}

.site-divider {
  width: 1px;
  height: 32px;
  background: var(--py-border);
}

.product-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.product-name {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--py-text);
}

.product-tag {
  font-size: 0.75rem;
  color: var(--py-muted);
  font-weight: 500;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

nav a:hover {
  text-decoration: none;
  color: var(--py-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--py-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--py-primary);
  color: #fff;
  border-color: var(--py-primary);
}

.btn-primary:hover {
  background: var(--py-primary-hover);
  border-color: var(--py-primary-hover);
  color: #fff;
}

.btn-outline {
  background: var(--py-surface);
  color: var(--py-text);
  border-color: var(--py-border);
}

.btn-outline:hover {
  background: var(--py-bg);
  color: var(--py-text);
}

/* Hero */
.hero {
  padding: 3rem 0 3.5rem;
  background: linear-gradient(180deg, var(--py-surface) 0%, var(--py-bg) 100%);
  border-bottom: 1px solid var(--py-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: var(--py-muted);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--py-muted);
}

.hero-note strong {
  color: var(--py-text);
}

.hero-visual {
  border-radius: var(--py-radius);
  overflow: hidden;
  box-shadow: var(--py-shadow-md);
  border: 1px solid var(--py-border);
}

.hero-visual figcaption {
  font-size: 0.75rem;
  color: var(--py-muted);
  padding: 0.5rem 0.75rem;
  background: var(--py-surface);
  border-top: 1px solid var(--py-border);
}

/* Sections */
section {
  padding: 3rem 0;
}

/* Alternate striping — exclude .download-band (it has its own dark theme; nth-child(even)
   would override .download-band and force white bg, breaking contrast and “white” buttons). */
section:nth-child(even):not(.download-band) {
  background: var(--py-surface);
  border-top: 1px solid var(--py-border);
  border-bottom: 1px solid var(--py-border);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--py-muted);
  max-width: 42rem;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--py-bg);
  border: 1px solid var(--py-border);
  border-radius: var(--py-radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--py-shadow);
}

section:nth-child(even) .card {
  background: var(--py-surface);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--py-radius-sm);
  background: var(--py-accent-soft);
  color: var(--py-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--py-muted);
}

/* Split image + text */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split.reverse {
    direction: rtl;
  }

  .split.reverse > * {
    direction: ltr;
  }
}

.split-visual {
  border-radius: var(--py-radius);
  overflow: hidden;
  border: 1px solid var(--py-border);
  box-shadow: var(--py-shadow-md);
}

.split-visual figcaption {
  font-size: 0.75rem;
  color: var(--py-muted);
  padding: 0.5rem 0.75rem;
  background: var(--py-surface);
}

/* FAQ */
.faq-section {
  padding: 3rem 0;
}

.faq-list {
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid var(--py-border);
  border-radius: var(--py-radius-sm);
  background: var(--py-surface);
  padding: 0 1rem;
  box-shadow: var(--py-shadow);
}

section:nth-child(even) .faq-item {
  background: var(--py-bg);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  list-style-position: outside;
}

.faq-item summary::-webkit-details-marker {
  color: var(--py-accent);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--py-border);
  margin-bottom: 0.75rem;
}

.faq-item p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--py-muted);
}

.faq-item p:last-child {
  margin-bottom: 1rem;
}

/* Download CTA — dark band using only theme colors (no external image: works offline, strict CSP, ad blockers). */
section#download.download-band {
  background-color: #27272a !important;
  background-image: linear-gradient(135deg, #52525b 0%, #3f3f46 40%, #27272a 100%) !important;
  color: #fafafa !important;
  padding: 2.75rem 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.download-band .section-title {
  color: #fff !important;
}

.download-band .section-intro {
  max-width: 36rem;
  color: #d4d4d8 !important;
}

.download-band .section-intro strong {
  color: #fff !important;
  font-weight: 600;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.download-band .btn-primary {
  background: #fff;
  color: var(--py-primary);
  border-color: #fff;
}

.download-band .btn-primary:hover {
  background: var(--py-accent-soft);
  border-color: var(--py-accent-soft);
  color: var(--py-primary-hover);
}

.download-band .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.download-band .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#download-hint {
  font-size: 0.85rem;
  opacity: 0.9;
  width: 100%;
  margin-top: 0.5rem;
}

/* Lists */
.value-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--py-muted);
}

.value-list li {
  margin-bottom: 0.65rem;
}

.value-list strong {
  color: var(--py-text);
}

/* Footer */
.site-footer {
  background: var(--py-text);
  color: #a1a1aa;
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #d4d4d8;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.site-footer h4 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #3f3f46;
  font-size: 0.8rem;
}

/* Legal pages */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.legal h1 {
  margin-top: 0;
  font-size: 1.75rem;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.legal pre,
.legal .license-block {
  background: var(--py-surface);
  border: 1px solid var(--py-border);
  border-radius: var(--py-radius-sm);
  padding: 1rem 1.15rem;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.legal .meta {
  color: var(--py-muted);
  font-size: 0.9rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--py-accent-soft);
  color: #0f766e;
}

/* Mobile nav toggle (simple) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--py-border);
  padding: 0.4rem 0.65rem;
  border-radius: var(--py-radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 0;
  }
}
