/* Rede da Costa — pescadorbr.digital | warm-earth neighborhood bulletin */

:root {
  --rc-bg: #f4efe6;
  --rc-surface: #fffaf3;
  --rc-ink: #3a2f26;
  --rc-ink-muted: #6d5c4d;
  --rc-ink-faint: #9a8778;
  --rc-border: #e5d9c8;
  --rc-border-strong: #cfc0ad;
  --rc-accent: #b85c38;
  --rc-accent-soft: #f0e0d4;
  --rc-clay: #c9a07a;
  --rc-sage: #6b7d5e;
  --rc-sand: #e8dcc8;
  --rc-shadow: 0 3px 18px rgba(58, 47, 38, 0.08);
  --rc-shadow-hover: 0 6px 24px rgba(58, 47, 38, 0.12);
  --rc-radius-sm: 6px;
  --rc-radius: 12px;
  --rc-radius-lg: 20px;
  --rc-container: 960px;
  --rc-space-xs: 8px;
  --rc-space-sm: 16px;
  --rc-space-md: 24px;
  --rc-space-lg: 32px;
  --rc-space-xl: 48px;
  --rc-font-headline: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --rc-font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --rc-line-tight: 1.3;
  --rc-line-body: 1.72;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rc-font-body);
  font-size: 1rem;
  line-height: var(--rc-line-body);
  color: var(--rc-ink);
  background: var(--rc-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover { color: var(--rc-ink); }

.container {
  width: min(100% - var(--rc-space-md), var(--rc-container));
  margin-inline: auto;
}

/* —— Header: logo-left-nav-right —— */
.site-header {
  background: var(--rc-surface);
  border-bottom: 1px solid var(--rc-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--rc-space-xs);
  text-decoration: none;
  color: var(--rc-ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--rc-font-headline);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: var(--rc-line-tight);
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--rc-ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
}

.nav-toggle {
  display: none;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: var(--rc-space-xs) var(--rc-space-sm);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--rc-ink);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--rc-space-md);
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-pills a {
  display: block;
  padding: var(--rc-space-xs) var(--rc-space-sm);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rc-ink-muted);
  transition: background 0.2s, color 0.2s;
}

.nav-pills a:hover {
  background: var(--rc-accent-soft);
  color: var(--rc-ink);
}

.nav-pills a.is-active {
  background: var(--rc-accent);
  color: #fff;
}

.header-contact {
  margin: 0;
  font-size: 0.8rem;
}

.header-contact a {
  color: var(--rc-ink-faint);
  text-decoration: none;
}

.header-contact a:hover { color: var(--rc-accent); }

/* —— 8-col asymmetric grid —— */
.asymmetric-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--rc-space-md);
  padding-block: var(--rc-space-lg);
}

.main-column {
  grid-column: 1 / 7;
}

.sidebar-rail {
  grid-column: 7 / 9;
}

/* —— Text-only hero / featured story —— */
.hero-text-lead {
  padding-block: var(--rc-space-xl) var(--rc-space-lg);
  border-bottom: 1px solid var(--rc-border);
}

.hero-text-lead .hero-meta {
  font-size: 0.85rem;
  color: var(--rc-ink-faint);
  margin-bottom: var(--rc-space-sm);
}

.hero-text-lead h1 {
  font-family: var(--rc-font-headline);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: var(--rc-line-tight);
  margin: 0 0 var(--rc-space-sm);
  font-weight: 700;
}

.hero-text-lead h1 a {
  color: var(--rc-ink);
  text-decoration: none;
}

.hero-text-lead h1 a:hover { color: var(--rc-accent); }

.hero-text-lead .lead {
  font-size: 1.15rem;
  color: var(--rc-ink-muted);
  max-width: 58ch;
  margin: 0 0 var(--rc-space-sm);
}

.hero-text-lead .read-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
}

/* —— Shadowed cards —— */
.card {
  background: var(--rc-surface);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.card:hover { box-shadow: var(--rc-shadow-hover); }

.card-img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--rc-radius) var(--rc-radius) 0 0;
}

.card-body {
  padding: var(--rc-space-sm) var(--rc-space-md) var(--rc-space-md);
}

.card-body h3 {
  font-family: var(--rc-font-headline);
  font-size: 1.1rem;
  margin: 0 0 var(--rc-space-xs);
  line-height: var(--rc-line-tight);
}

.card-body h3 a {
  color: var(--rc-ink);
  text-decoration: none;
}

.card-body h3 a:hover { color: var(--rc-accent); }

.featured-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rc-space-md);
  margin-bottom: var(--rc-space-lg);
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rc-ink-faint);
  margin: 0 0 var(--rc-space-sm);
  font-weight: 600;
}

/* —— Compact dense article list —— */
.article-dense-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rc-border);
}

.article-dense-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--rc-space-sm);
  padding: var(--rc-space-sm) 0;
  border-bottom: 1px solid var(--rc-border);
  align-items: start;
}

.article-dense-thumb img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--rc-radius-sm);
}

.article-dense-item h3 {
  font-family: var(--rc-font-headline);
  font-size: 0.95rem;
  margin: 0 0 4px;
  line-height: 1.35;
}

.article-dense-item h3 a {
  color: var(--rc-ink);
  text-decoration: none;
}

.article-dense-item h3 a:hover { color: var(--rc-accent); }

.article-dense-excerpt {
  font-size: 0.85rem;
  color: var(--rc-ink-muted);
  margin: 0 0 4px;
  line-height: 1.5;
}

.article-row-meta {
  font-size: 0.78rem;
  color: var(--rc-ink-faint);
  margin: 0;
}

/* —— Sidebar: author-widget-only —— */
.author-widget {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  padding: var(--rc-space-md);
  box-shadow: var(--rc-shadow);
  position: sticky;
  top: 80px;
}

.author-widget-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: var(--rc-space-sm);
}

.author-widget h3 {
  font-family: var(--rc-font-headline);
  font-size: 1rem;
  margin: 0 0 4px;
}

.author-widget .role {
  font-size: 0.8rem;
  color: var(--rc-accent);
  margin: 0 0 var(--rc-space-sm);
}

.author-widget p {
  font-size: 0.85rem;
  color: var(--rc-ink-muted);
  margin: 0;
  line-height: 1.55;
}

/* —— Prose —— */
.prose { max-width: 65ch; }

.prose h2 {
  font-family: var(--rc-font-headline);
  font-size: 1.35rem;
  margin: var(--rc-space-lg) 0 var(--rc-space-sm);
}

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

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

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

.prose li { margin-bottom: 6px; }

.prose .lead {
  font-size: 1.12rem;
  color: var(--rc-ink-muted);
  line-height: 1.65;
}

/* —— Pull-quote-led article —— */
.article-header {
  padding-block: var(--rc-space-lg) var(--rc-space-md);
}

.article-header h1 {
  font-family: var(--rc-font-headline);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: var(--rc-line-tight);
  margin: 0 0 var(--rc-space-sm);
}

.article-byline {
  font-size: 0.85rem;
  color: var(--rc-ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: var(--rc-space-sm);
  margin: 0;
}

.pull-quote {
  font-family: var(--rc-font-headline);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.45;
  color: var(--rc-accent);
  border-left: 4px solid var(--rc-clay);
  padding: var(--rc-space-sm) 0 var(--rc-space-sm) var(--rc-space-md);
  margin: 0 0 var(--rc-space-lg);
  font-style: italic;
}

.article-layout {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--rc-space-md);
  padding-bottom: var(--rc-space-xl);
}

.article-body {
  grid-column: 1 / 6;
}

.article-sidebar {
  grid-column: 6 / 9;
}

.figure-rounded img {
  border-radius: var(--rc-radius);
  width: 100%;
  margin: var(--rc-space-md) 0;
}

/* —— Page hero —— */
.page-hero {
  padding-block: var(--rc-space-xl) var(--rc-space-md);
}

.page-hero h1 {
  font-family: var(--rc-font-headline);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 var(--rc-space-sm);
}

.content-narrow {
  max-width: 640px;
  padding-bottom: var(--rc-space-xl);
}

/* —— Articles listing —— */
.articles-list-page .article-dense-item {
  grid-template-columns: 96px 1fr;
  padding: var(--rc-space-md) 0;
}

.articles-list-page .article-dense-thumb img {
  width: 96px;
  height: 72px;
}

/* —— Stacked footer —— */
.site-footer {
  background: var(--rc-ink);
  color: #e8ddd0;
  padding-block: var(--rc-space-xl);
  margin-top: var(--rc-space-lg);
}

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rc-space-lg);
}

.footer-brand .brand-name {
  font-family: var(--rc-font-headline);
  font-size: 1.2rem;
  color: #fff;
  margin: 0 0 var(--rc-space-xs);
}

.footer-brand p {
  font-size: 0.9rem;
  color: #c9b8a8;
  margin: 0 0 var(--rc-space-xs);
  max-width: 42ch;
}

.footer-brand a { color: var(--rc-clay); }

.footer-links-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rc-space-xs);
}

.footer-links-stack h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9a8778;
  margin: 0 0 var(--rc-space-xs);
}

.footer-links-stack ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rc-space-sm) var(--rc-space-md);
}

.footer-links-stack a {
  color: #e8ddd0;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links-stack a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: var(--rc-space-lg);
  padding-top: var(--rc-space-md);
  font-size: 0.8rem;
  color: #9a8778;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rc-space-sm);
  justify-content: space-between;
}

/* —— Cookie bottom bar —— */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--rc-ink);
  color: #e8ddd0;
  padding: var(--rc-space-sm) var(--rc-space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--rc-space-sm);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-bar.is-visible { transform: translateY(0); }

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

.cookie-bar a { color: var(--rc-clay); }

.cookie-accept {
  background: var(--rc-accent);
  color: #fff;
  border: none;
  border-radius: var(--rc-radius-sm);
  padding: var(--rc-space-xs) var(--rc-space-md);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.cookie-accept:hover { background: var(--rc-clay); }

/* —— Form —— */
.form-group {
  margin-bottom: var(--rc-space-sm);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--rc-space-xs) var(--rc-space-sm);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--rc-surface);
}

.related-block {
  margin-top: var(--rc-space-xl);
  padding-top: var(--rc-space-md);
  border-top: 1px solid var(--rc-border);
}

.related-block h3 {
  font-family: var(--rc-font-headline);
  font-size: 1rem;
  margin: 0 0 var(--rc-space-sm);
}

.related-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-block li {
  margin-bottom: var(--rc-space-xs);
  font-size: 0.9rem;
}

.related-block a { text-decoration: none; }

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

  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rc-surface);
    border-bottom: 1px solid var(--rc-border);
    flex-direction: column;
    align-items: stretch;
    padding: var(--rc-space-sm) var(--rc-space-md);
    display: none;
    box-shadow: var(--rc-shadow);
  }

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

  .site-header { position: relative; }

  .header-contact { padding-top: var(--rc-space-xs); }

  .asymmetric-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .main-column,
  .sidebar-rail,
  .article-body,
  .article-sidebar {
    grid-column: 1 / -1;
  }

  .featured-cards {
    grid-template-columns: 1fr;
  }

  .author-widget { position: static; }
}
