/* Quantum Brasil — tech-blue-gray editorial system */
:root {
  --primary: #1D3557;
  --accent: #00A8E8;
  --bg: #F1F7FF;
  --text: #0B1F33;
  --muted: #6C8AA6;
  --white: #ffffff;
  --line: rgba(29, 53, 87, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --container: 960px;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --shadow-soft: 0 4px 24px rgba(11, 31, 51, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.brand img { width: 36px; height: 36px; }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-primary a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.nav-primary a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--primary);
}

/* Category tags row */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag::before { content: "["; margin-right: 2px; }
.tag::after { content: "]"; margin-left: 2px; }

.tag:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--primary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 168, 232, 0.06);
}

/* Hero carousel — manual only */
.hero-carousel {
  position: relative;
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
}

.carousel-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.carousel-content {
  padding: 2rem 2rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.carousel-content .tag { margin-bottom: 0.75rem; }

.carousel-content h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.carousel-content p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.carousel-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 2rem;
  display: flex;
  gap: 0.4rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}

.carousel-dot.is-active { background: var(--accent); }

/* Bento grid — unique asymmetric layout */
.bento-section {
  margin: 2.5rem 0;
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 1rem;
}

.bento-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

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

.bento-card--lines {
  border-left: 3px solid var(--accent);
}

.bento-span-8 { grid-column: span 8; }
.bento-span-7 { grid-column: span 7; }
.bento-span-6 { grid-column: span 6; }
.bento-span-5 { grid-column: span 5; }
.bento-span-4 { grid-column: span 4; }
.bento-span-3 { grid-column: span 3; }
.bento-row-2 { grid-row: span 2; }

.bento-card img {
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.bento-card h3 {
  margin: 0.25rem 0 0.5rem;
}

.bento-card h3 a { color: inherit; }
.bento-card h3 a:hover { color: var(--accent); }

.bento-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.bento-featured {
  padding: 1.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, #2a4a72 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
}

.bento-featured h3,
.bento-featured h2 { color: var(--white); }

.bento-featured p { color: rgba(255,255,255,0.82); }

.bento-featured .tag { color: rgba(255,255,255,0.7); }

/* Compact dense list */
.feed-section { margin: 2.5rem 0 3rem; }

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

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

.compact-list li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

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

.compact-list .num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--line);
  line-height: 1;
}

.compact-list h3 {
  margin: 0;
  font-size: 1rem;
}

.compact-list .date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Editorial lines card */
.editorial-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-sm) var(--radius-md) var(--radius-md) var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Article layout — sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  margin: 2rem 0 3rem;
  align-items: start;
}

.article-header { margin-bottom: 1.5rem; }

.article-header h1 { margin: 0.5rem 0 0.75rem; }

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

.article-body img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.article-body ul, .article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(0, 168, 232, 0.06);
  font-style: italic;
  color: var(--primary);
}

/* Author widget */
.sidebar .author-widget {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
}

.author-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.author-card h4 {
  margin: 0 0 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--primary);
}

.author-card .role {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.author-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* Page content */
.page-content {
  margin: 2rem 0 3rem;
  max-width: 720px;
}

.page-content.wide { max-width: none; }

.page-content h1 { margin-bottom: 1rem; }

.updated-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Articles listing */
.articles-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 3rem;
}

.article-preview {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
}

.article-preview img { border-radius: var(--radius-sm); aspect-ratio: 4/3; object-fit: cover; }

.article-preview h2 { margin: 0.25rem 0 0.5rem; font-size: 1.2rem; }

.article-preview p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 520px;
  margin-top: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
}

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

/* Stacked footer */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

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

.footer-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.cookie-note a {
  color: var(--accent);
}

.cookie-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-top: 0.75rem;
}

.cookie-note button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

.cookie-note.is-hidden { display: none; }

/* Utility */
.text-muted { color: var(--muted); }
.mt-2 { margin-top: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

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

  .nav-primary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    gap: 0.75rem;
  }

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

  .header-inner { position: relative; }

  .carousel-slide {
    grid-template-columns: 1fr;
  }

  .carousel-slide img {
    border-radius: 0;
    min-height: 200px;
  }

  .carousel-content { padding: 1.25rem; }

  .bento-span-8,
  .bento-span-7,
  .bento-span-6,
  .bento-span-5,
  .bento-span-4,
  .bento-span-3 {
    grid-column: span 12;
  }

  .bento-row-2 { grid-row: span 1; }

  .compact-list li {
    grid-template-columns: 48px 1fr;
  }

  .compact-list .date {
    grid-column: 2;
    margin-top: -0.25rem;
  }

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

  .sidebar .author-widget { position: static; }

  .article-preview {
    grid-template-columns: 1fr;
  }
}
