/* Pulso — pulsebr.digital
   Archetype: minimal-editorial | Palette: carvão + azul elétrico
   Header: minimal-header | Homepage: article-stream
   Typography: spacious-magazine | Cards: editorial-lines */

:root {
  --carvao: #2A2A2A;
  --carvao-light: #3D3D3D;
  --carvao-muted: #5C5C5C;
  --azul: #3B82F6;
  --azul-dark: #2563EB;
  --azul-light: #60A5FA;
  --azul-pale: #EFF6FF;
  --paper: #FAFAFA;
  --paper-warm: #F5F5F4;
  --white: #FFFFFF;
  --line: #E5E5E5;
  --line-strong: #D4D4D4;
  --text: var(--carvao);
  --text-muted: var(--carvao-muted);
  --text-light: #8A8A8A;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-wide: 1080px;
  --max-read: 40rem;
  --header-h: 52px;
}

[data-theme="dark"] {
  --paper: #1A1A1A;
  --paper-warm: #222222;
  --white: #262626;
  --line: #333333;
  --line-strong: #404040;
  --text: #E8E8E8;
  --text-muted: #A8A8A8;
  --text-light: #787878;
  --carvao: #E8E8E8;
  --carvao-light: #D0D0D0;
  --azul-pale: #1E293B;
}

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

html {
  font-size: 19px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--text);
  background: var(--paper);
  line-height: 1.82;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover { color: var(--azul); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--carvao);
  font-weight: 700;
  margin-top: 0;
  letter-spacing: -0.015em;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: var(--text); }

h1 { font-size: clamp(1.85rem, 4.5vw, 2.65rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); margin-bottom: 0.7em; }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1.2em; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }

.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;
}

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ——— Minimal header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-row {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--carvao);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.logo:hover { color: var(--carvao); }

.logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--azul);
  border-radius: 50%;
  margin-bottom: 2px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header-nav a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.header-nav a:hover,
.header-nav a.active { color: var(--azul); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle,
.menu-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  border-radius: 2px;
}

.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--azul);
  color: var(--azul);
}

.menu-toggle {
  display: none;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

/* Category strip */
.cat-strip {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}

.cat-strip__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.cat-strip a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-light);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.cat-strip a:hover,
.cat-strip a.active {
  color: var(--azul-dark);
  border-bottom-color: var(--azul);
}

/* ——— Article stream (homepage) ——— */
.stream-intro {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.stream-kicker {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--azul);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.stream-intro h1 {
  max-width: 36rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.stream-lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 38rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.stream-body {
  max-width: 38rem;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.78;
}

.stream-body p:last-child { margin-bottom: 0; }

.article-stream { margin: 0; }

.stream-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.85rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .stream-card {
    grid-template-columns: 148px 1fr;
    gap: 1.5rem;
  }
}

.stream-card__thumb {
  display: block;
  text-decoration: none;
}

.stream-card__thumb img {
  width: 100%;
  background: var(--paper-warm);
}

.stream-card__cat {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--azul);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
}

.stream-card h2 {
  font-size: clamp(1.12rem, 2.2vw, 1.38rem);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.stream-card h2 a {
  color: var(--carvao);
  text-decoration: none;
}

.stream-card h2 a:hover { color: var(--azul); text-decoration: underline; }

[data-theme="dark"] .stream-card h2 a { color: var(--text); }

.stream-card__meta {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.stream-card__meta strong { color: var(--text-muted); font-weight: 600; }

.updated-tag {
  font-style: italic;
  color: var(--azul);
}

.stream-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

.stream-card__wc {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.55rem;
  letter-spacing: 0.04em;
}

/* ——— Page headers ——— */
.page-header {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 36rem;
  margin: 0;
}

/* ——— Articles listing ——— */
.articles-list { padding: 0.5rem 0 3rem; }

.list-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .list-row {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
  }
}

.list-row img { width: 100%; background: var(--paper-warm); }

.list-row .card-body { padding: 0; }

.list-row h2 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: 0.45rem;
}

.list-row h2 a {
  color: var(--carvao);
  text-decoration: none;
}

.list-row h2 a:hover { color: var(--azul); text-decoration: underline; }

.card-meta {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 0.65rem;
}

.category {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--azul);
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

/* ——— Minimalist reading (articles) ——— */
.article-page { padding: 2.25rem 0 3.5rem; }

.article-header {
  max-width: var(--max-read);
  margin: 0 auto 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin-bottom: 0.85rem;
  line-height: 1.18;
}

.article-deck {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0;
  font-style: normal;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--text-light);
  margin-top: 1.1rem;
  letter-spacing: 0.02em;
}

.article-body {
  max-width: var(--max-read);
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.88;
  letter-spacing: 0.012em;
}

.article-body .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-body h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.35rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--azul);
  color: var(--text-muted);
  font-size: 1.02rem;
}

.article-body figure {
  margin: 2rem 0;
  padding: 0;
}

.article-body figure img {
  width: 100%;
  background: var(--paper-warm);
}

.article-body figcaption {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Author boxes */
.author-box {
  max-width: var(--max-read);
  margin: 3rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.author-box.style-classic {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-box.style-minimal {
  text-align: left;
  padding: 1.5rem 0 0;
}

.author-box.style-bordered {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: start;
  padding-top: 1.75rem;
}

.author-box.style-accent {
  background: var(--azul-pale);
  padding: 1.5rem;
  border-top: none;
  margin-top: 3rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

[data-theme="dark"] .author-box.style-accent {
  background: var(--azul-pale);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-box.style-bordered .author-avatar { border-radius: 4px; }

.author-box.style-accent .author-avatar {
  width: 80px;
  height: 80px;
  border: 2px solid var(--azul);
}

.author-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.author-role {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.author-bio {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* About & legal */
.about-content,
.legal-content {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.about-content p,
.legal-content p,
.legal-content li {
  font-size: 0.96rem;
  line-height: 1.82;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.65rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.contact-info h3 { margin-bottom: 0.75rem; }

/* Footer */
.site-footer {
  background: var(--carvao);
  color: rgba(255,255,255,0.65);
  padding: 2.75rem 0 1.25rem;
  margin-top: 1rem;
}

[data-theme="dark"] .site-footer {
  background: #111111;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 0.65rem;
}

.footer-brand p {
  font-size: 0.86rem;
  line-height: 1.65;
  margin: 0;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.85rem;
  font-weight: 600;
}

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

.footer-col li { margin-bottom: 0.45rem; }

.footer-col a {
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem;
  text-decoration: none;
}

.footer-col a:hover { color: var(--azul-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
}

/* Cookie */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--carvao);
  color: rgba(255,255,255,0.85);
  padding: 0.9rem 1.5rem;
  z-index: 300;
  display: none;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cookie-notice.visible { display: block; }

.cookie-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  margin: 0;
  font-size: 0.8rem;
  flex: 1;
  min-width: 200px;
}

.cookie-inner a { color: var(--azul-light); }

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.55rem 1.15rem;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
}

.btn-azul {
  background: var(--azul);
  color: var(--white);
}

.btn-azul:hover {
  background: var(--azul-dark);
  color: var(--white);
}

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

  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.5rem 1rem;
    border-bottom: 1px solid var(--line);
    gap: 0;
  }

  .header-nav.open { display: flex; }

  .header-nav a {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-header { position: relative; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .author-box.style-classic,
  .author-box.style-accent,
  .author-box.style-bordered {
    flex-direction: column;
  }

  .author-box.style-bordered { display: flex; }
}

@media (max-width: 480px) {
  html { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
}
