/* Proton Faces docs — "Nocturne" theme.
 * Mirrors the app's design tokens (app/src/static/index.html):
 * graphite neutrals, green accent #5AC272, dark-first with a light variant.
 */

:root {
  --pf-bg: #101114;
  --pf-bg2: #15161a;
  --pf-panel: #17181d;
  --pf-panel2: #1e2026;
  --pf-border: #26282f;
  --pf-border2: #32353e;
  --pf-text: #f2f3f5;
  --pf-muted: #9aa0ab;
  --pf-faint: #5c616d;
  --pf-accent: #5ac272;
  --pf-accent-strong: #7edb93;
  --pf-accent-soft: rgba(90, 194, 114, 0.14);
  --pf-on-accent: #04140a;
  --pf-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

/* Light-mode overrides — same hue family, app's light tokens. */
[data-md-color-scheme="default"] {
  --pf-bg: #f4f5f7;
  --pf-bg2: #eef0f3;
  --pf-panel: #ffffff;
  --pf-panel2: #f0f2f5;
  --pf-border: #e3e5ea;
  --pf-border2: #d5d8df;
  --pf-text: #17191d;
  --pf-muted: #6b7078;
  --pf-faint: #9aa0ab;
  --pf-accent: #1f9d4d;
  --pf-accent-strong: #17803e;
  --pf-accent-soft: rgba(31, 157, 77, 0.12);
  --pf-on-accent: #ffffff;
}

/* Force a denser, more app-like UI */
.md-grid {
  max-width: 1280px;
}

/* Typography */
.md-typeset {
  font-size: 0.92rem;
  line-height: 1.65;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 2.4rem;
}

.md-typeset h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Hero on the index page */
.pf-hero {
  position: relative;
  margin: -1.5rem -1.5rem 2rem;
  padding: 4rem 1.5rem 3rem;
  background:
    radial-gradient(ellipse at top right, var(--pf-accent-soft), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(90, 194, 114, 0.06), transparent 50%),
    linear-gradient(135deg, var(--pf-bg2) 0%, var(--pf-panel) 50%, var(--pf-panel2) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pf-border2);
}

.pf-hero h1 {
  font-size: 3rem;
  line-height: 1.05;
  margin: 0 0 0.5rem;
  color: var(--pf-text);
}

.pf-hero .pf-tagline {
  font-size: 1.25rem;
  color: var(--pf-muted);
  margin: 0 0 1.5rem;
  max-width: 720px;
}

.pf-hero .pf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pf-hero .pf-badges img {
  height: 22px;
}

.pf-hero .pf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pf-hero .pf-cta a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pf-hero .pf-cta a:hover {
  transform: translateY(-1px);
}

.pf-hero .pf-cta-primary {
  background: var(--pf-accent);
  color: var(--pf-on-accent);
  box-shadow: 0 4px 14px rgba(90, 194, 114, 0.3);
}

.pf-hero .pf-cta-primary:hover {
  box-shadow: 0 6px 20px rgba(90, 194, 114, 0.45);
  color: var(--pf-on-accent);
}

.pf-hero .pf-cta-secondary {
  background: var(--pf-panel2);
  color: var(--pf-text);
  border: 1px solid var(--pf-border2);
}

.pf-hero .pf-cta-secondary:hover {
  background: var(--pf-panel);
  color: var(--pf-accent-strong);
}

/* Login hint shown under the hero call-to-action buttons */
.pf-hero .pf-demo-credentials {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--pf-muted);
}
.pf-hero .pf-demo-credentials code {
  background: var(--pf-accent-soft);
  color: var(--pf-accent-strong);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Hero split: copy on the left, phone GIF on the right */
.pf-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.pf-hero-copy {
  min-width: 0;
}

.pf-hero-phone {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.pf-hero-phone img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--pf-border2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
  .pf-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .pf-hero-phone img {
    max-width: 240px;
  }
}

/* Card grids */
.pf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.pf-card {
  background: var(--pf-panel);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.pf-card:hover {
  transform: translateY(-2px);
  border-color: var(--pf-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

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

.pf-card h3 a {
  color: inherit;
  text-decoration: none;
}

.pf-card h3 a::before {
  content: none;
}

.pf-card p {
  margin: 0;
  color: var(--pf-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pf-card .pf-icon {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1.6rem;
  text-align: center;
  background: var(--pf-accent-soft);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Screenshot frames */
.pf-shot {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pf-border2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: var(--pf-panel);
}

.pf-shot img,
.pf-shot video {
  display: block;
  width: 100%;
  height: auto;
}

.pf-shot-caption {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--pf-muted);
  border-top: 1px solid var(--pf-border);
  background: var(--pf-bg2);
}

/* Screenshot gallery (auto-fit 2-up) */
.pf-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.pf-gallery .pf-shot {
  margin: 0;
}

/* Screencast embed */
.pf-video {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pf-border2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pf-video video {
  display: block;
  width: 100%;
  height: auto;
}

/* Mobile GIF — centered, capped width, on a subtle panel */
.pf-mobile-gif {
  margin: 1.5rem auto;
  max-width: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pf-border2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background: var(--pf-panel);
}

.pf-mobile-gif img {
  display: block;
  width: 100%;
  height: auto;
}

/* Inline accent pills */
.pf-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--pf-accent-soft);
  color: var(--pf-accent-strong);
  border: 1px solid var(--pf-accent);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Banner / callout */
.pf-banner {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--pf-accent-soft);
  border: 1px solid var(--pf-accent);
  border-radius: 8px;
  font-size: 0.92rem;
}

/* Better tables */
.md-typeset table:not([class]) {
  font-size: 0.88rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--pf-border);
}

.md-typeset table:not([class]) th {
  background: var(--pf-panel2);
  font-weight: 600;
  color: var(--pf-accent-strong);
}

.md-typeset table:not([class]) tr:nth-child(2n) {
  background: var(--pf-bg2);
}

/* Admonition tweaks */
.md-typeset .admonition {
  border-radius: 10px;
  border-width: 1px;
}

/* Navigation: green accent */
.md-tabs__link--active {
  color: var(--pf-accent-strong) !important;
}

.md-nav__link--active {
  color: var(--pf-accent-strong) !important;
}

.md-nav__link:hover {
  color: var(--pf-accent-strong);
}

/* Code blocks */
.md-typeset code {
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.85em;
}

.md-typeset pre > code {
  border-radius: 10px;
}

/* Footer */
.md-footer {
  background: var(--pf-bg);
}

.md-footer-meta {
  background: var(--pf-bg);
}

/* Hide repo-edit on certain pages */
.md-typeset .pf-no-edit {
  display: none;
}