/* The Lecto blog. Colors, type, header, footer and buttons are a copy of the website's
   src/styles/global.css and src/marketing/marketing.css in the app repository.
   "npm run check:chrome" says when the originals change. */

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

:root {
  --bg: #0F0E0C;
  --surface: #1A1916;
  --surface2: #232220;
  --accent: #C9A84C;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --text-primary: #F0EDE6;
  --text-secondary: #9A9589;
  --text-muted: #918E89;
  --card-border: rgba(255, 255, 255, 0.06);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  font-variant-numeric: lining-nums;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-nav {
  position: absolute; left: -9999px; top: 0; z-index: 4000;
  padding: 10px 16px; background: var(--accent); color: #1A1206;
  font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-nav:focus { left: 0; }

/* Buttons */
.mkt-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  border-radius: 12px; padding: 11px 18px; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.mkt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.mkt-btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.mkt-btn-gold { background: var(--accent); color: #1a1400; }
.mkt-btn-gold:hover { opacity: 0.9; }
.mkt-btn-ghost { background: transparent; color: var(--text-primary); }
.mkt-btn-ghost:hover { color: var(--accent); }

/* Header */
.mkt-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 14, 12, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.mkt-nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mkt-wordmark { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: 0.04em; color: var(--accent); }
.mkt-nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  border: 1px solid var(--card-border); border-radius: 10px;
  cursor: pointer; list-style: none;
}
.mkt-nav-toggle::-webkit-details-marker { display: none; }
.mkt-nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--text-primary); border-radius: 2px; }
.mkt-nav-links {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - 70px); overflow-y: auto;
  background: var(--surface); border-bottom: 1px solid var(--card-border);
  padding: 12px 20px 20px;
}
.mkt-nav-links > a:not(.mkt-btn) { color: var(--text-secondary); font-size: 16px; font-weight: 500; padding: 12px 0; }
.mkt-nav-links > a:not(.mkt-btn):hover { color: var(--text-primary); }
.mkt-nav-links .mkt-btn { margin-top: 8px; }
.blog-wide-links { display: none; }

/* Footer */
.mkt-footer { border-top: 1px solid var(--card-border); background: var(--surface); }
.mkt-footer-inner { max-width: 1080px; margin: 0 auto; padding: 56px 20px 40px; }
.mkt-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
.mkt-footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mkt-footer-col > a { font-size: 14px; overflow-wrap: anywhere; }
.mkt-footer a:not(.mkt-btn) { color: var(--accent); }
.mkt-footer-wordmark { font-size: 22px; }
.mkt-footer-tag { font-size: 14px; color: var(--text-secondary); line-height: 1.55; max-width: 30ch; }
.mkt-footer-heading {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 2px;
}
.mkt-footer-legal {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--card-border);
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* Blog pages */
.blog-main { flex: 1 0 auto; width: 100%; padding: 28px 20px 72px; }
.blog-main:focus { outline: none; }
.blog-column { max-width: 700px; margin: 0 auto; overflow-wrap: break-word; }

.crumbs { margin-bottom: 32px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; }
.crumbs li { min-width: 0; }
.crumbs li + li::before { content: '>' / ''; margin: 0 8px; color: var(--text-muted); }
.crumbs a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.blog-title { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.15; letter-spacing: -0.01em; }
.post-meta { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.post-summary { margin-top: 12px; font-size: 17px; line-height: 1.6; color: var(--text-secondary); }
.post-summary a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-cover { width: 100%; border-radius: 14px; border: 1px solid var(--card-border); }
.post-head .post-cover { margin-top: 28px; }
.draft-tag, .draft-note strong { color: var(--accent); }
.draft-note { margin-bottom: 20px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 10px; font-size: 15px; line-height: 1.5; }

.post-list { list-style: none; margin-top: 12px; }
.post-card { padding: 32px 0; border-bottom: 1px solid var(--card-border); }
.post-card .post-cover { margin-bottom: 20px; }
.post-card h2 { font-family: var(--serif); font-weight: 700; font-size: 24px; line-height: 1.25; }
.post-card h2 a:hover { color: var(--accent); }

.post-body { margin-top: 36px; font-size: 18px; line-height: 1.7; }
.post-body > * + * { margin-top: 1.2em; }
.post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { font-family: var(--serif); line-height: 1.25; margin-bottom: -0.3em; }
.post-body h2 { font-size: 28px; font-weight: 700; margin-top: 1.7em; }
.post-body h3 { font-size: 22px; font-weight: 600; margin-top: 1.5em; }
.post-body h4, .post-body h5, .post-body h6 { font-size: 19px; font-weight: 600; margin-top: 1.4em; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li, .post-body li > ul, .post-body li > ol, .post-body li > p + p { margin-top: 0.5em; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-primary); font-style: italic; }
.post-body blockquote > * + * { margin-top: 1em; }
.post-body img { border-radius: 12px; }
.post-body code { font-size: 0.9em; background: var(--surface2); border-radius: 4px; padding: 2px 5px; }
.post-body pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border-radius: 10px; padding: 16px; }
.post-body pre code { background: none; padding: 0; }
.post-body hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.18); }

.demo-box {
  margin-top: 56px; padding: 32px 24px; text-align: center;
  background: var(--surface); border: 1px solid rgba(201, 168, 76, 0.35); border-radius: 18px;
}
.demo-box h2 { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.2; margin-bottom: 20px; }

@media (min-width: 720px) {
  .blog-menu { display: none; }
  .mkt-nav-links.blog-wide-links {
    display: flex; position: static; flex-direction: row; align-items: center; gap: 24px;
    max-height: none; overflow: visible; padding: 0; background: transparent; border: none;
  }
  .blog-wide-links > a:not(.mkt-btn) { padding: 0; font-size: 15px; }
  .blog-wide-links .mkt-btn { margin-top: 0; }
  .blog-main { padding-top: 40px; }
  .blog-title { font-size: 44px; }
  .post-card h2 { font-size: 28px; }
  .mkt-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
}
@media (min-width: 720px) and (max-width: 767px) {
  .mkt-nav-links.blog-wide-links { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mkt-btn { transition: none; }
}
