/* Sinal — enviabr.click
   Archetype: research-publication | Palette: índigo + off-white
   Header: compact-topbar | Homepage: editorial-columns | Article: sidebar-article
   Typography: compact-news | Cards: flat | Personality: research-focused */

:root {
  --indigo-900: #1a2266;
  --indigo-800: #232d7a;
  --indigo-700: #2E3A8C;
  --indigo-600: #3d4ba3;
  --indigo-500: #5562b8;
  --indigo-300: #9aa5d4;
  --indigo-100: #e4e7f4;
  --off-white: #F8F7F4;
  --off-white-dark: #edebe6;
  --white: #ffffff;
  --text: #1c1e28;
  --text-muted: #5a5d6b;
  --text-light: #7a7d8a;
  --border: #d8d6d0;
  --border-strong: var(--indigo-700);
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-wide: 1140px;
  --max-read: 40rem;
  --topbar-h: 46px;
  --sidebar-w: 260px;
}

[data-theme="dark"] {
  --off-white: #14161e;
  --off-white-dark: #1c1f2a;
  --white: #22252f;
  --text: #e8e9ed;
  --text-muted: #a8aab4;
  --text-light: #888a96;
  --border: #353842;
  --indigo-100: #2a3050;
  --indigo-300: #6b78b8;
  --indigo-700: #7a88c8;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--indigo-700);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--indigo-900); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.85rem; margin-bottom: 0.65rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

p { margin-bottom: 0.95rem; }

ul, ol { margin: 0 0 0.95rem 1.25rem; }
li { margin-bottom: 0.3rem; }

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

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

/* ——— Compact topbar ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--indigo-700);
  color: var(--white);
  border-bottom: 2px solid var(--indigo-900);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

.brand:hover { color: var(--indigo-100); }

.brand__mark { width: 24px; height: 24px; flex-shrink: 0; }

.brand__tag {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

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

.topbar__date {
  font-size: 0.68rem;
  opacity: 0.75;
  display: none;
}

@media (min-width: 768px) {
  .topbar__date { display: block; }
}

.theme-btn,
.menu-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  border-radius: 2px;
}

.theme-btn:hover { background: rgba(255,255,255,0.1); }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
  border: none;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
}

.main-nav {
  display: flex;
  gap: 0.15rem 1.1rem;
  align-items: center;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  border-bottom-color: var(--indigo-100);
}

@media (max-width: 767px) {
  .menu-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    background: var(--indigo-800);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.1rem 1rem;
    border-bottom: 2px solid var(--indigo-900);
    gap: 0;
  }

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

  .main-nav a {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
}

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

.cat-strip__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.45rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.cat-strip a {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-decoration: none;
}

.cat-strip a:hover,
.cat-strip a.active { color: var(--indigo-700); }

/* ——— Flat cards ——— */
.card {
  background: var(--white);
  border: 1px solid var(--border);
}

.card-body { padding: 0.85rem 1rem; }

.category {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-700);
  margin-bottom: 0.35rem;
}

.card-meta {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ——— Homepage: editorial-columns ——— */
.columns-hero {
  padding: 1.5rem 0 1rem;
}

.columns-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .columns-grid {
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
  }
}

.col-main .card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.col-main h2 { font-size: 1.55rem; }
.col-main h2 a { color: var(--text); text-decoration: none; }
.col-main h2 a:hover { color: var(--indigo-700); }

.col-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-sm {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
}

.card-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 90px;
}

.card-sm h3 { font-size: 0.95rem; }
.card-sm h3 a { color: var(--text); text-decoration: none; }
.card-sm h3 a:hover { color: var(--indigo-700); }

.card-sm .card-body { padding: 0.65rem 0.75rem; }

.intro-editorial {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.intro-editorial p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 68ch;
}

.intro-editorial p:last-child { margin-bottom: 0; }

.section {
  padding: 1.5rem 0 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--indigo-700);
}

.section-header h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo-700);
  margin: 0;
}

.section-header a {
  font-size: 0.72rem;
  font-weight: 600;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-3 .card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.grid-3 h3 a { color: var(--text); text-decoration: none; }
.grid-3 h3 a:hover { color: var(--indigo-700); }

.grid-3 p:not(.card-meta) {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.editorial-picks {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.editorial-picks .card { border-left: 3px solid var(--indigo-700); }

.cta-band {
  background: var(--indigo-700);
  color: var(--white);
  text-align: center;
  padding: 2rem 1.1rem;
  margin-top: 1rem;
}

.cta-band h2 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.cta-band p {
  font-size: 0.88rem;
  opacity: 0.9;
  max-width: 42ch;
  margin: 0 auto 1rem;
}

.btn {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

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

.btn-indigo:hover {
  background: var(--indigo-900);
  color: var(--white);
}

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

.page-header h1 { font-size: 1.65rem; }

.page-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.page-content {
  max-width: var(--max-read);
  padding-bottom: 2.5rem;
}

.page-content h2 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  color: var(--indigo-800);
}

/* ——— Articles list ——— */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

.article-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
}

@media (min-width: 600px) {
  .article-list-item {
    grid-template-columns: 200px 1fr;
  }
}

.article-list-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 140px;
}

.article-list-item h2 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

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

.article-list-item h2 a:hover { color: var(--indigo-700); }

.article-list-item .card-body { padding: 1rem 1.1rem; }

/* ——— Sidebar article layout ——— */
.article-page { padding: 1.25rem 0 2.5rem; }

.article-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.article-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-700);
}

.article-deck {
  font-size: 1.02rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.72rem;
  color: var(--text-light);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 2.5rem;
  }
}

.article-content {
  font-size: 0.94rem;
}

.article-content .lead {
  font-size: 1.02rem;
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.5;
}

.article-content h2 {
  font-size: 1.12rem;
  margin-top: 1.5rem;
  color: var(--indigo-800);
}

.article-content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--indigo-700);
  background: var(--indigo-100);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.article-content figure {
  margin: 1.25rem 0;
}

.article-content figcaption {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.data-callout {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo-700);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

.data-callout strong {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--indigo-700);
  margin-bottom: 0.35rem;
}

.article-sidebar .sidebar-block {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.article-sidebar h3 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-700);
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-related a {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-related a:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-related a span {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.sidebar-related a:hover { color: var(--indigo-700); }

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.source-list li {
  margin-bottom: 0.4rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--indigo-100);
}

.author-box {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.75rem;
  padding: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
}

.author-box img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
}

.author-box h4,
.author-box .author-name {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.author-role {
  font-size: 0.72rem;
  color: var(--indigo-700);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.author-box p:last-child {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ——— About team ——— */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

.about-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

@media (min-width: 700px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-box {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.contact-box h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.contact-email {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--indigo-700);
}

/* ——— Footer ——— */
.site-footer {
  background: var(--indigo-900);
  color: rgba(255,255,255,0.8);
  padding: 2rem 0 1rem;
  margin-top: auto;
}

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

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .brand-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.footer-col h4 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 0.65rem;
}

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

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

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

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.72rem;
}

/* ——— Cookie notice ——— */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 2px solid var(--indigo-700);
  padding: 0.85rem 1.1rem;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

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

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

.cookie-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.cookie-inner a { text-decoration: underline; }
