/* ── BugTrack Marketing Site ── */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Tokens */
:root {
  --purple-50: #f5f0ff;
  --purple-100: #ede5ff;
  --purple-200: #d4c4fb;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-800: #5b21b6;
  --purple-900: #4c1d95;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --bg: #ffffff;
  --bg-alt: var(--purple-50);
  --bg-card: #ffffff;
  --text: var(--slate-800);
  --text-muted: var(--slate-500);
  --text-heading: var(--slate-900);
  --accent: var(--purple-600);
  --accent-hover: var(--purple-700);
  --accent-light: var(--purple-100);
  --border: var(--slate-200);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(124,58,237,.08), 0 4px 10px rgba(0,0,0,.04);
  --radius: 12px;
  --radius-sm: 8px;

  --font-display: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Inter:wght@400;500;600&display=swap');

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

/* No global max-width on p — it breaks card and grid layouts.
   Prose line-length is constrained at the container level (.post__body). */
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-heading);
}

.nav__brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: .925rem;
  font-weight: 500;
  transition: color .15s;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  transition: background .15s, transform .1s;
}

.nav__cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
  transform: translateY(-1px);
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: .2s;
}

@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav__links.open { display: flex; }
}

/* ── Hero ── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--purple-50) 0%, var(--bg) 100%);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .9rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all .15s;
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero__screenshot {
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(124,58,237,.12), 0 8px 20px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}

.hero__screenshot img {
  width: 100%;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.feature-card h3 {
  margin-bottom: .6rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: .925rem;
  line-height: 1.6;
}

/* ── Section headers ── */
.section__header {
  text-align: center;
  margin-bottom: 1rem;
}

.section__header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: .75rem auto 0;
  max-width: 560px;
}

.section__label {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ── Screenshot showcase ── */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

.showcase--reverse { direction: rtl; }
.showcase--reverse > * { direction: ltr; }

.showcase__text h3 {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.showcase__text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.showcase__text ul {
  list-style: none;
  padding: 0;
}

.showcase__text ul li {
  padding: .35rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: .925rem;
}

.showcase__text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .7rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple-400);
}

.showcase__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .showcase--reverse { direction: ltr; }
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
  margin-top: 3rem;
}

.stat__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat__label {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: .35rem;
}

/* ── CTA ── */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--purple-800) 0%, var(--purple-600) 100%);
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: .75rem;
}

.cta-section p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  margin: 0 auto 2rem;
  max-width: 500px;
}

.cta-section .btn--primary {
  background: #fff;
  color: var(--accent);
}

.cta-section .btn--primary:hover {
  background: var(--purple-50);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

/* ── Footer ── */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--slate-50);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: .875rem;
  margin-top: .5rem;
  max-width: 280px;
}

.footer__col-heading {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.footer__col ul {
  list-style: none;
  padding: 0;
}

.footer__col ul li {
  margin-bottom: .4rem;
}

.footer__col ul a {
  color: var(--text);
  font-size: .9rem;
}

.footer__col ul a:hover {
  color: var(--accent);
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: .825rem;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

/* ── Features page ── */
.page-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--purple-50) 0%, var(--bg) 100%);
}

.page-hero h1 {
  margin-bottom: .75rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 560px;
}

/* Features detail list */
.features-detail {
  display: grid;
  gap: 5rem;
  margin-top: 2rem;
}

.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.feature-detail:nth-child(even) { direction: rtl; }
.feature-detail:nth-child(even) > * { direction: ltr; }

.feature-detail__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.feature-detail__content h3 {
  font-size: 1.5rem;
  margin-bottom: .6rem;
}

.feature-detail__content p {
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-detail__content ul {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

.feature-detail__content ul li {
  padding: .4rem 0 .4rem 1.6rem;
  position: relative;
  color: var(--text);
  font-size: .925rem;
}

.feature-detail__content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 768px) {
  .feature-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature-detail:nth-child(even) { direction: ltr; }
}

/* ── About page ── */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Fixed 2x2 rather than auto-fit: there are exactly four values, and
   auto-fit collapses them to a single row of four on a wide screen, which
   reads as a feature strip instead of a considered set. */
.about-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
@media (max-width: 700px) {
  .about-values { grid-template-columns: 1fr; gap: 1.25rem; }
}

.about-value {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about-value h3 {
  margin-bottom: .5rem;
}

.about-value p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ── Screenshot lightbox ── */
.is-zoomable { cursor: zoom-in; }
.is-zoomable:focus-visible {
  outline: 3px solid var(--accent, #7c3aed);
  outline-offset: 3px;
}
body.has-lightbox { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(15, 10, 30, 0.92);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #fff;
}
.lightbox__caption {
  color: #DDD6FE;
  font-size: 13px;
  text-align: center;
  max-width: 70ch;
  line-height: 1.5;
}

.lightbox__close,
.lightbox__nav {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 26px;
}
.lightbox__nav {
  width: 46px;
  height: 46px;
  font-size: 30px;
}

@media (max-width: 640px) {
  .lightbox { padding: 12px; gap: 4px; }
  .lightbox__nav { width: 38px; height: 38px; font-size: 24px; }
  .lightbox__caption { font-size: 12px; }
}

/* ── Free / pricing banner ── */
.free-banner {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
}
.free-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pricing {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-card, #fff);
  border: 2px solid var(--accent, #7c3aed);
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.12);
}
.pricing__tag {
  display: inline-block;
  background: #EDE9FE;
  color: #5B21B6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.pricing__price {
  font-size: 60px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink, #1e1b2e);
  letter-spacing: -2px;
}
.pricing__price span { font-size: 18px; font-weight: 600; color: var(--text-muted, #7a7488); }
.pricing__note { color: var(--text-muted, #7a7488); font-size: 14px; margin-top: 10px; }
.pricing__list {
  list-style: none;
  padding: 0;
  margin: 26px 0;
  text-align: left;
  display: grid;
  gap: 11px;
}
.pricing__list li {
  padding-left: 28px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}
.pricing__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #059669;
  font-weight: 700;
}

/* ── Download ── */
.download-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e1db);
  border-radius: 16px;
  padding: 32px;
}
.download-box__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.download-box__meta { font-size: 13px; color: var(--text-muted, #7a7488); line-height: 1.7; }
.download-box__hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
  color: var(--text-muted, #7a7488);
  background: var(--code-bg, #f0ede8);
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 14px;
  display: block;
}
.download-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 14px;
}
.download-steps li {
  counter-increment: step;
  padding-left: 40px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
}
.download-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #EDE9FE;
  color: #5B21B6;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.download-steps code {
  background: var(--code-bg, #f0ede8);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13.5px;
}

/* ── FAQ ── */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e1db);
  border-radius: 12px;
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent, #7c3aed);
  flex: none;
}
.faq details[open] summary::after { content: '−'; }
.faq details > p {
  margin: 0 0 18px;
  color: var(--text, #3d3852);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Contact form ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.form label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink, #1e1b2e);
}
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border, #e5e1db);
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
  background: var(--bg-card, #fff);
  color: var(--ink, #1e1b2e);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}
.form textarea { resize: vertical; min-height: 130px; }
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__status { font-size: 14px; line-height: 1.6; min-height: 1.2em; }
.form__status--ok { color: #059669; font-weight: 500; }
.form__status--error { color: #DC2626; }
.form__hint { font-size: 13px; color: var(--text-muted, #7a7488); }

/* ── Screenshot gallery ──
   Uniform cards on purpose. The source screenshots have very different
   natural aspect ratios, so letting them size themselves produces a ragged
   grid with no shared baseline. Each is cropped to a fixed 16:10 window
   anchored to the top of the image, which is where a UI screenshot carries
   its identifying detail. The full, uncropped image is one click away in the
   lightbox, so nothing is lost by cropping here. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.gallery__item {
  margin: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e1db);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.gallery__item:hover {
  transform: translateY(-3px);
  border-color: #C4B5FD;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.14);
}

.gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: #F5F3FF;
  border-bottom: 1px solid var(--border-light, #eeeae5);
}

.gallery__item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #1e1b2e);
}
/* Affordance for the lightbox, so the cards do not look merely decorative. */
.gallery__item figcaption::after {
  content: '⤢';
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted, #7a7488);
  transition: color 0.18s ease;
}
.gallery__item:hover figcaption::after { color: var(--accent, #7c3aed); }

@media (prefers-reduced-motion: reduce) {
  .gallery__item, .gallery__item figcaption::after { transition: none; }
  .gallery__item:hover { transform: none; }
}

.download-box__verify {
  margin: 22px 0 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink, #1e1b2e);
}

/* ── About page: contact ── */
.about-contact {
  text-align: center;
  margin-top: 2rem;
}
/* The address is long; without this the icon and the text wrap onto separate
   lines inside the button on narrower screens. */
.about-contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  max-width: 100%;
}
.about-contact__btn svg { flex: none; }
.about-contact__btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 420px) {
  .about-contact__btn { font-size: 14px; padding-left: 16px; padding-right: 16px; }
}

/* ── Blog ───────────────────────────────────────────────────────────────── */
.blog-hero {
  padding: 64px 0 36px;
  text-align: center;
}
.blog-hero h1 { margin-bottom: 12px; }
.blog-hero p {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--text-muted, #7a7488);
  font-size: 17px;
  line-height: 1.65;
}

.post-list {
  display: grid;
  gap: 18px;
  max-width: 780px;
  margin: 0 auto 40px;
}
.post-card {
  display: block;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e1db);
  border-radius: 14px;
  padding: 26px 28px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: #C4B5FD;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.12);
}
.post-card h2 {
  font-size: 21px;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--ink, #1e1b2e);
}
.post-card p {
  margin: 0 0 14px;
  color: var(--text, #3d3852);
  line-height: 1.65;
  font-size: 15px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted, #7a7488);
}
.post-meta__tag {
  background: #EDE9FE;
  color: #5B21B6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ── Article ── */
.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 24px;
}
.post__header { margin-bottom: 34px; }
.post__header h1 {
  font-size: clamp(30px, 4.6vw, 42px);
  line-height: 1.18;
  margin: 14px 0 16px;
}
.post__standfirst {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted, #7a7488);
  margin: 0;
}
.post__body { font-size: 17px; line-height: 1.75; color: var(--text, #3d3852); max-width: 65ch; }
.post__body h2 {
  font-size: 25px;
  line-height: 1.3;
  margin: 44px 0 14px;
  color: var(--ink, #1e1b2e);
}
.post__body h3 {
  font-size: 19px;
  margin: 32px 0 10px;
  color: var(--ink, #1e1b2e);
}
.post__body p { margin: 0 0 18px; }
.post__body ul, .post__body ol { margin: 0 0 20px; padding-left: 24px; }
.post__body li { margin-bottom: 9px; }
.post__body a { color: var(--accent, #7c3aed); text-underline-offset: 3px; }
.post__body code {
  background: var(--code-bg, #f0ede8);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}
.post__body pre {
  background: #1E1B2E;
  color: #EDE9FE;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
}
.post__body pre code { background: none; padding: 0; color: inherit; }
.post__body blockquote {
  margin: 0 0 22px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent, #7c3aed);
  color: var(--text-muted, #7a7488);
  font-style: italic;
}
.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}
.post__body th, .post__body td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e5e1db);
  vertical-align: top;
}
.post__body th { font-weight: 700; color: var(--ink, #1e1b2e); }
.post__body .table-wrap { overflow-x: auto; }

/* Short factual summary near the top. Answer engines lift these wholesale,
   so it is written to stand alone without the article around it. */
.key-takeaway {
  background: #FAF9FF;
  border: 1px solid #DDD6FE;
  border-left: 4px solid var(--accent, #7c3aed);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 0 0 30px;
}
.key-takeaway strong { display: block; margin-bottom: 8px; color: #5B21B6; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.key-takeaway p { margin: 0; font-size: 16px; line-height: 1.65; }

.post-cta {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border-radius: 14px;
  padding: 30px 32px;
  margin: 44px 0 0;
}
.post-cta h3 { color: #fff; margin: 0 0 10px; font-size: 21px; }
.post-cta p { color: #EDE9FE; margin: 0 0 18px; line-height: 1.65; }
.post-cta .btn { background: #fff; color: #5B21B6; border-color: #fff; }
.post-cta .btn:hover { background: #F5F3FF; }

.post-related {
  border-top: 1px solid var(--border, #e5e1db);
  margin-top: 46px;
  padding-top: 28px;
}
.post-related h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted, #7a7488); margin: 0 0 14px; }
.post-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.post-related a { color: var(--accent, #7c3aed); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}

/* ── Article furniture: TOC, share, pager ────────────────────────────────
   All three are built by assets/site.js from the article's own headings and
   a post list, so a new post gets them without any extra markup. */

.post__byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted, #7a7488);
  margin-top: 18px;
}
.post__byline b { color: var(--ink, #1e1b2e); font-weight: 600; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent, #7c3aed);
  text-decoration: none;
  margin-bottom: 22px;
}
.post-back:hover { text-decoration: underline; text-underline-offset: 3px; }

.post__figure { margin: 0 0 26px; }
.post__figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e1db);
  display: block;
}
.post__figure figcaption {
  margin-top: 9px;
  font-size: 13px;
  color: var(--text-muted, #7a7488);
  text-align: center;
}

/* Table of contents. A list on mobile inside a <details>, a sticky rail on
   wide screens where there is room beside the column. */
.post-toc {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e1db);
  border-radius: 12px;
  padding: 0 18px;
  margin: 0 0 30px;
}
.post-toc summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink, #1e1b2e);
}
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary::after { content: '+'; font-size: 19px; font-weight: 400; color: var(--accent, #7c3aed); }
.post-toc[open] summary::after { content: '−'; }
.post-toc ol, .post-toc ul { list-style: none; padding: 0; margin: 0 0 16px; }
.post-toc li { margin-bottom: 8px; font-size: 14.5px; line-height: 1.5; padding-left: 12px; position: relative; }
/* A dash rather than a number: some posts number their own headings, and a
   generated counter produced '1. 1. A title that states the symptom'. */
.post-toc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 1px;
  background: var(--text-muted, #7a7488);
}
.post-toc a { color: var(--text, #3d3852); text-decoration: none; }
.post-toc a:hover { color: var(--accent, #7c3aed); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1180px) {
  .post-toc {
    position: fixed;
    top: 110px;
    left: calc(50% - 600px);
    width: 210px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    background: none;
    border: none;
    border-left: 2px solid var(--border, #e5e1db);
    border-radius: 0;
    padding: 2px 0 2px 16px;
  }
  .post-toc summary { display: none; }
  .post-toc ol, .post-toc ul { margin: 0; }
  .post-toc li { font-size: 13.5px; }
  .post-toc a.is-current { color: var(--accent, #7c3aed); font-weight: 600; }
}

/* Anchor offset so a heading is not hidden behind the sticky nav. */
.post__body h2[id] { scroll-margin-top: 90px; }

.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--border, #e5e1db);
}
.post-share__label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #7a7488);
  margin-right: 4px;
}
.post-share a, .post-share button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border, #e5e1db);
  border-radius: 999px;
  background: var(--bg-card, #fff);
  color: var(--text, #3d3852);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.post-share a:hover, .post-share button:hover {
  border-color: var(--accent, #7c3aed);
  color: var(--accent, #7c3aed);
  background: #FAF9FF;
}
.post-share button.is-copied { border-color: #059669; color: #059669; }

.post-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 34px;
}
@media (max-width: 620px) { .post-pager { grid-template-columns: 1fr; } }
.post-pager a {
  display: block;
  border: 1px solid var(--border, #e5e1db);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-pager a:hover { border-color: #C4B5FD; box-shadow: 0 8px 22px rgba(124, 58, 237, 0.1); }
.post-pager span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #7a7488);
  margin-bottom: 6px;
}
.post-pager b { font-size: 15px; line-height: 1.4; color: var(--ink, #1e1b2e); font-weight: 600; }
.post-pager a.is-next { text-align: right; }

/* Index cards are text only, on purpose. Thumbnails here were screenshots
   of the same application at panel size: illegible, near-identical, and
   they pushed the headline down without helping anyone choose. */
.post-card { padding: 26px 30px 28px; }

@media (prefers-reduced-motion: reduce) {
  .post-share a, .post-share button, .post-pager a { transition: none; }
}

.blog-feed-note {
  text-align: center;
  margin: 4px 0 64px;
  color: var(--text-muted, #7a7488);
  font-size: 14px;
}
