/* Margem Segura — lockbr.click | minimal-editorial | high-contrast-bw */

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #5c5c5c;
  --border: #d4d4d4;
  --accent: #0a0a0a;
  --container: 720px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
  --radius: 0;
  --line: 1.7;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: var(--line);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* —— Header —— */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.site-logo {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

.site-logo:hover {
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--fg);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--fg);
  border-radius: var(--radius);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-nav a {
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--fg);
  text-decoration: none;
}

/* —— Main —— */
main {
  flex: 1;
  padding: var(--space-lg) 0;
}

/* —— Labels (mono-accent) —— */
.label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: block;
  margin-bottom: var(--space-xs);
}

/* —— Hero (text-only-lead) —— */
.hero {
  margin-bottom: var(--space-xl);
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 58ch;
}

.hero-frame {
  margin-top: var(--space-lg);
  border: 1px solid var(--border);
  padding: var(--space-md);
}

.hero-frame svg {
  width: 100%;
  height: auto;
}

/* —— Prose —— */
.prose h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: var(--space-lg) 0 var(--space-sm);
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: var(--space-md) 0 var(--space-xs);
}

.prose p {
  margin-bottom: var(--space-sm);
}

.prose ul, .prose ol {
  margin: var(--space-sm) 0 var(--space-sm) 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose blockquote {
  border-left: 2px solid var(--fg);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
  color: var(--muted);
  font-style: italic;
}

/* —— Feed (numbered-list) —— */
.feed {
  list-style: none;
  counter-reset: feed;
}

.feed-item {
  counter-increment: feed;
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.feed-item:last-child {
  border-bottom: 1px solid var(--border);
}

.feed-item::before {
  content: counter(feed, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: var(--space-sm);
}

.feed-card {
  display: grid;
  gap: var(--space-md);
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: baseline;
}

.feed-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.feed-title a {
  text-decoration: none;
}

.feed-title a:hover {
  text-decoration: underline;
}

.feed-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
}

.feed-thumb {
  border: 1px solid var(--border);
  padding: var(--space-sm);
  max-width: 200px;
}

/* —— Article reading —— */
.article-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: var(--space-sm);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--muted);
}

.article-meta .author {
  color: var(--fg);
}

.article-body {
  font-size: 1rem;
}

.article-body p {
  margin-bottom: var(--space-md);
}

/* —— Page header —— */
.page-header {
  margin-bottom: var(--space-lg);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.page-intro {
  color: var(--muted);
  max-width: 55ch;
}

/* —— Contact —— */
.contact-block {
  margin-top: var(--space-md);
}

.contact-block p {
  margin-bottom: var(--space-sm);
}

/* —— Articles index —— */
.articles-list {
  list-style: none;
}

.articles-list li {
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.articles-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.articles-list a {
  text-decoration: none;
  font-weight: 600;
}

.articles-list a:hover {
  text-decoration: underline;
}

.articles-list .date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

/* —— Footer (minimal-single) —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
}

.footer-nav a {
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}

.cookie-note {
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

.cookie-note[hidden] {
  display: none;
}

/* —— Utility —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Responsive —— */
@media (max-width: 640px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: var(--space-sm);
  }

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

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-direction: column;
    gap: var(--space-sm);
  }

  main {
    padding: var(--space-md) 0;
  }

  .hero {
    margin-bottom: var(--space-lg);
  }
}

@media (min-width: 641px) {
  .feed-card {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
