/* Estaleiro Brasil — barcobr.digital | regional-press | deep-navy */

:root {
  --eb-navy-950: #071428;
  --eb-navy-900: #0c1f3d;
  --eb-navy-800: #122a52;
  --eb-navy-700: #1a3a6b;
  --eb-navy-600: #2a5089;
  --eb-navy-500: #3d6aa8;
  --eb-navy-400: #6b8fbe;
  --eb-navy-300: #9bb4d4;
  --eb-navy-200: #c8d6e8;
  --eb-navy-100: #e4ecf5;
  --eb-navy-50: #f2f6fa;
  --eb-cream: #faf8f4;
  --eb-ink: #0c1f3d;
  --eb-ink-muted: #3d5570;
  --eb-ink-faint: #6b8099;
  --eb-accent: #c4a035;
  --eb-accent-soft: #f0e8d0;
  --eb-border: #b8c9dc;
  --eb-border-strong: #8fa8c4;
  --eb-surface: #ffffff;
  --eb-container: 1140px;
  --eb-space-xs: 6px;
  --eb-space-sm: 12px;
  --eb-space-md: 18px;
  --eb-space-lg: 24px;
  --eb-space-xl: 36px;
  --eb-radius: 0;
  --eb-font-display: "Georgia", "Times New Roman", serif;
  --eb-font-body: "Helvetica Neue", Arial, sans-serif;
  --eb-font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --eb-line-tight: 1.2;
  --eb-line-body: 1.55;
  --eb-line-loose: 1.7;
  --eb-sidebar: 260px;
}

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

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

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

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

a {
  color: var(--eb-navy-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--eb-navy-500); }

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

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--eb-space-md);
}

/* —— Cookie top-strip —— */
.cookie-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--eb-navy-900);
  color: var(--eb-navy-200);
  padding: var(--eb-space-xs) var(--eb-space-md);
  font-size: 0.8125rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--eb-space-md);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--eb-accent);
}

.cookie-strip.is-visible { display: flex; }

.cookie-strip p { margin: 0; flex: 1; min-width: 200px; line-height: 1.4; }
.cookie-strip a { color: var(--eb-accent); }

body.has-cookie-strip .site-header { top: 40px; }

/* —— Double-row header + sticky-shrink —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--eb-surface);
  border-bottom: 2px solid var(--eb-navy-800);
  transition: box-shadow 0.25s ease;
}

.site-header.is-shrunk {
  box-shadow: 0 4px 16px rgba(7, 20, 40, 0.15);
}

.header-top {
  background: var(--eb-navy-950);
  color: var(--eb-navy-300);
  font-family: var(--eb-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--eb-space-xs) 0;
  overflow: hidden;
  max-height: 32px;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.site-header.is-shrunk .header-top {
  max-height: 0;
  padding: 0;
}

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

.header-top a {
  color: var(--eb-navy-300);
  text-decoration: none;
}

.header-top a:hover { color: var(--eb-accent); }

.header-main { padding: var(--eb-space-sm) 0; transition: padding 0.25s ease; }
.site-header.is-shrunk .header-main { padding: var(--eb-space-xs) 0; }

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  transition: width 0.25s, height 0.25s;
}

.site-header.is-shrunk .brand-mark {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--eb-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--eb-line-tight);
  transition: font-size 0.25s;
}

.site-header.is-shrunk .brand-name { font-size: 1.2rem; }

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

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--eb-border);
  padding: var(--eb-space-xs) var(--eb-space-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--eb-font-ui);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eb-navy-800);
}

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

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

.nav-primary a {
  display: block;
  padding: var(--eb-space-xs) var(--eb-space-sm);
  text-decoration: none;
  font-family: var(--eb-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eb-ink-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-primary a:hover,
.nav-primary a.is-active {
  color: var(--eb-navy-800);
  border-bottom-color: var(--eb-accent);
}

/* —— Typography: mixed-newsroom —— */
h1, h2, h3, h4 {
  font-family: var(--eb-font-display);
  line-height: var(--eb-line-tight);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 0;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); margin-bottom: var(--eb-space-md); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: var(--eb-space-sm); }
h3 { font-size: 1.15rem; margin-bottom: var(--eb-space-xs); }

.lead {
  font-family: var(--eb-font-display);
  font-size: 1.125rem;
  line-height: var(--eb-line-loose);
  color: var(--eb-ink-muted);
  margin-bottom: var(--eb-space-lg);
}

.prose p { margin: 0 0 var(--eb-space-sm); }
.prose ul, .prose ol { margin: 0 0 var(--eb-space-sm); padding-left: var(--eb-space-lg); }
.prose li { margin-bottom: var(--eb-space-xs); }

/* —— Buttons: outlined —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--eb-space-xs);
  padding: var(--eb-space-xs) var(--eb-space-md);
  font-family: var(--eb-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--eb-navy-700);
  background: transparent;
  color: var(--eb-navy-800);
  transition: background 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--eb-navy-800);
  color: var(--eb-surface);
}

.btn-ghost {
  border-color: var(--eb-border);
  color: var(--eb-ink-muted);
}

.btn-ghost:hover {
  background: var(--eb-navy-50);
  color: var(--eb-navy-800);
  border-color: var(--eb-navy-600);
}

/* —— Tags: uppercase-small —— */
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--eb-font-ui);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid var(--eb-border);
  background: var(--eb-navy-50);
  color: var(--eb-navy-700);
}

.tag--mercado { border-color: var(--eb-navy-400); background: var(--eb-navy-100); }
.tag--estaleiro { border-color: var(--eb-accent); background: var(--eb-accent-soft); color: var(--eb-navy-900); }
.tag--regulacao { border-color: var(--eb-navy-600); background: var(--eb-navy-800); color: var(--eb-navy-100); }
.tag--industria { border-color: var(--eb-border-strong); }
.tag--sul { border-color: #7a9e6b; background: #eef4ea; }
.tag--guia { border-color: var(--eb-navy-500); }

/* —— Cards: bordered —— */
.card {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--eb-navy-600); }

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

.card-img {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--eb-navy-100);
  border-bottom: 1px solid var(--eb-border);
}

.card-img img, .card-img svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Hero carousel single —— */
.hero-carousel {
  position: relative;
  margin-bottom: var(--eb-space-xl);
  border: 1px solid var(--eb-border);
  background: var(--eb-surface);
}

.hero-slide {
  display: none;
  grid-template-columns: 7fr 5fr;
  gap: 0;
  align-items: stretch;
}

.hero-slide.is-active { display: grid; }

.hero-visual {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--eb-navy-900);
}

.hero-visual img, .hero-visual svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: var(--eb-space-md) var(--eb-space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--eb-border);
}

.hero-content h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: var(--eb-space-sm);
}

.hero-content h2 a { text-decoration: none; color: var(--eb-ink); }
.hero-content h2 a:hover { color: var(--eb-navy-600); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--eb-space-sm);
  align-items: center;
  margin-bottom: var(--eb-space-sm);
  font-family: var(--eb-font-ui);
  font-size: 0.75rem;
  color: var(--eb-ink-faint);
}

.hero-controls {
  display: flex;
  gap: var(--eb-space-xs);
  margin-top: var(--eb-space-md);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border: 2px solid var(--eb-navy-600);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dot.is-active {
  background: var(--eb-navy-800);
  border-color: var(--eb-navy-800);
}

/* —— Magazine grid: left-rail sidebar —— */
.magazine-grid {
  display: grid;
  grid-template-columns: var(--eb-sidebar) 1fr;
  gap: var(--eb-space-lg);
  margin-bottom: var(--eb-space-xl);
}

.magazine-grid--article {
  grid-template-columns: var(--eb-sidebar) minmax(0, 1fr);
  align-items: start;
}

.main-column { min-width: 0; }

.sidebar-rail {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sidebar-block {
  background: var(--eb-surface);
  border: 1px solid var(--eb-border);
  padding: var(--eb-space-md);
  margin-bottom: var(--eb-space-md);
}

.sidebar-block h3 {
  font-family: var(--eb-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--eb-ink-faint);
  margin-bottom: var(--eb-space-sm);
  padding-bottom: var(--eb-space-xs);
  border-bottom: 2px solid var(--eb-navy-800);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  padding-block: var(--eb-space-xs);
  border-bottom: 1px solid var(--eb-border);
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--eb-ink);
}

.sidebar-list .meta {
  display: block;
  font-family: var(--eb-font-ui);
  font-size: 0.6875rem;
  color: var(--eb-ink-faint);
  margin-top: 2px;
}

/* —— Article list: horizontal rows —— */
.article-rows { list-style: none; margin: 0; padding: 0; }

.article-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--eb-space-md);
  padding-block: var(--eb-space-md);
  border-bottom: 1px solid var(--eb-border);
  align-items: start;
}

.article-row:first-child { padding-top: 0; }

.article-row-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--eb-navy-100);
  border: 1px solid var(--eb-border);
}

.article-row-thumb img, .article-row-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-row-title {
  font-family: var(--eb-font-display);
  font-size: 1.2rem;
  margin: 0 0 var(--eb-space-xs);
  line-height: var(--eb-line-tight);
}

.article-row-title a { text-decoration: none; color: var(--eb-ink); }
.article-row-title a:hover { color: var(--eb-navy-600); text-decoration: underline; }

.article-row-excerpt {
  color: var(--eb-ink-muted);
  font-size: 0.9rem;
  margin: 0 0 var(--eb-space-xs);
}

.article-row-meta {
  font-family: var(--eb-font-ui);
  font-size: 0.75rem;
  color: var(--eb-ink-faint);
  display: flex;
  flex-wrap: wrap;
  gap: var(--eb-space-sm);
  align-items: center;
}

/* —— Featured picks —— */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--eb-space-md);
  margin-bottom: var(--eb-space-xl);
}

.section-label {
  font-family: var(--eb-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--eb-navy-800);
  margin-bottom: var(--eb-space-sm);
  padding-bottom: var(--eb-space-xs);
  border-bottom: 3px solid var(--eb-navy-800);
  display: inline-block;
  font-weight: 700;
}

/* —— Wide magazine article —— */
.article-header {
  max-width: 780px;
  margin: 0 auto var(--eb-space-lg);
  padding-top: var(--eb-space-lg);
}

.article-header h1 { margin-bottom: var(--eb-space-sm); }

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--eb-space-sm);
  font-family: var(--eb-font-ui);
  font-size: 0.8125rem;
  color: var(--eb-ink-faint);
  margin-bottom: var(--eb-space-md);
  padding-bottom: var(--eb-space-sm);
  border-bottom: 1px solid var(--eb-border);
}

.article-byline span + span::before {
  content: "·";
  margin-right: var(--eb-space-sm);
  color: var(--eb-border-strong);
}

.article-wide {
  font-size: 1.0625rem;
  line-height: var(--eb-line-loose);
}

.article-wide .breakout {
  margin-block: var(--eb-space-lg);
  border: 1px solid var(--eb-border);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.article-wide .breakout img,
.article-wide .breakout svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-wide h2 {
  margin-top: var(--eb-space-lg);
  margin-bottom: var(--eb-space-sm);
  font-size: 1.35rem;
}

.updated-note { font-style: italic; font-size: 0.75rem; }

/* —— Author inline-byline —— */
.author-inline {
  display: flex;
  gap: var(--eb-space-sm);
  align-items: center;
  padding: var(--eb-space-md);
  border: 1px solid var(--eb-border);
  background: var(--eb-navy-50);
  margin-block: var(--eb-space-lg);
}

.author-inline img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--eb-border);
}

.author-inline strong {
  display: block;
  font-family: var(--eb-font-ui);
  font-size: 0.875rem;
  color: var(--eb-ink);
}

.author-inline span {
  font-size: 0.8125rem;
  color: var(--eb-ink-muted);
}

/* —— Related —— */
.related-block {
  margin-top: var(--eb-space-xl);
  padding-top: var(--eb-space-lg);
  border-top: 2px solid var(--eb-navy-800);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--eb-space-md);
}

.related-item a {
  text-decoration: none;
  font-weight: 600;
  font-family: var(--eb-font-display);
}

.related-item .meta {
  font-family: var(--eb-font-ui);
  font-size: 0.75rem;
  color: var(--eb-ink-faint);
}

/* —— Page layouts —— */
.page-hero {
  padding-block: var(--eb-space-xl) var(--eb-space-lg);
  border-bottom: 1px solid var(--eb-border);
  margin-bottom: var(--eb-space-lg);
}

.content-narrow {
  max-width: 720px;
  margin: 0 auto var(--eb-space-xl);
}

.content-narrow.prose { font-size: 1rem; }

/* —— Two-column footer —— */
.site-footer {
  background: var(--eb-navy-950);
  color: var(--eb-navy-300);
  padding-block: var(--eb-space-xl);
  margin-top: var(--eb-space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--eb-space-lg);
}

.footer-brand .brand-name {
  font-family: var(--eb-font-display);
  font-size: 1.35rem;
  color: var(--eb-surface);
  margin-bottom: var(--eb-space-xs);
}

.footer-brand p {
  font-size: 0.875rem;
  max-width: 42ch;
  line-height: 1.5;
}

.footer-brand a { color: var(--eb-accent); text-decoration: none; }
.footer-brand a:hover { text-decoration: underline; }

.footer-links h4 {
  font-family: var(--eb-font-ui);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--eb-navy-400);
  margin-bottom: var(--eb-space-sm);
}

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

.footer-links li { margin-bottom: var(--eb-space-xs); }

.footer-links a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--eb-navy-200);
}

.footer-links a:hover { color: var(--eb-accent); }

.footer-bottom {
  margin-top: var(--eb-space-lg);
  padding-top: var(--eb-space-md);
  border-top: 1px solid var(--eb-navy-800);
  font-family: var(--eb-font-ui);
  font-size: 0.75rem;
  color: var(--eb-navy-500);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--eb-space-sm);
}

/* —— Contact form —— */
.form-group { margin-bottom: var(--eb-space-md); }

.form-group label {
  display: block;
  font-family: var(--eb-font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--eb-space-xs);
}

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

.form-group textarea { min-height: 140px; resize: vertical; }

/* —— Author cards (about page) —— */
.author-card {
  display: flex;
  gap: var(--eb-space-md);
  align-items: flex-start;
  border: 1px solid var(--eb-border);
  padding: var(--eb-space-md);
  margin-bottom: var(--eb-space-md);
  background: var(--eb-surface);
}

.author-avatar {
  width: 72px;
  height: 72px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--eb-border);
}

.author-avatar img, .author-avatar svg { width: 100%; height: 100%; }

.author-info h4 {
  font-family: var(--eb-font-ui);
  font-size: 1rem;
  margin: 0 0 4px;
}

.author-info .role {
  font-size: 0.75rem;
  color: var(--eb-ink-faint);
  margin-bottom: var(--eb-space-xs);
}

.author-info p {
  font-size: 0.9rem;
  color: var(--eb-ink-muted);
  margin: 0;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .magazine-grid,
  .magazine-grid--article { grid-template-columns: 1fr; }
  .sidebar-rail { position: static; }
  .featured-grid { grid-template-columns: 1fr; }
  .hero-slide { grid-template-columns: 1fr; }
  .hero-content { border-left: none; border-top: 1px solid var(--eb-border); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

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

  .header-nav.is-open { display: flex; }
  .nav-primary { flex-direction: column; }
  .header-main { position: relative; }

  .article-row { grid-template-columns: 1fr; }
  .article-row-thumb { max-width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
}
