/* Caimento — calca.digital | high-contrast-bw | compact-news | 12-col-classic */

:root {
  --color-bg: #ffffff;
  --color-surface: #f5f5f5;
  --color-text: #0a0a0a;
  --color-muted: #5c5c5c;
  --color-border: #d4d4d4;
  --color-accent: #0a0a0a;
  --color-accent-text: #ffffff;
  --color-tag-bg: #0a0a0a;
  --color-tag-text: #ffffff;
  --color-quote-bg: #f0f0f0;
  --color-quote-border: #0a0a0a;

  --font-sans: system-ui, "Segoe UI", system-ui, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;

  --radius-soft: 6px;
  --container: 1140px;
  --header-height: 72px;
  --header-height-shrunk: 52px;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);

  --line-height-tight: 1.35;
  --line-height-body: 1.55;
  --font-size-body: 0.9375rem;
  --font-size-small: 0.8125rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { opacity: 0.75; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: var(--line-height-tight);
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h3 { font-size: 1.125rem; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

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

.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-12 { grid-column: span 12; }

/* Compact topbar header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-text);
  height: var(--header-height);
  transition: height 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-shrunk {
  height: var(--header-height-shrunk);
  box-shadow: var(--shadow-card);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  transition: font-size 0.25s ease;
}

.site-header.is-shrunk .logo { font-size: 1.05rem; }

.logo svg { width: 32px; height: 32px; flex-shrink: 0; transition: width 0.25s, height 0.25s; }
.site-header.is-shrunk .logo svg { width: 26px; height: 26px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: var(--font-size-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.main-nav a.is-active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-soft);
  padding: 6px 10px;
  cursor: pointer;
  font-size: var(--font-size-small);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: var(--font-size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-soft);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-filled {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.btn-filled:hover { opacity: 0.85; transform: translateY(-1px); }

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
}

.tag:hover { opacity: 0.8; }

/* Hero split-image-text */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.hero-split__text .kicker {
  font-size: var(--font-size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.hero-split__text .lead {
  font-size: 1.0625rem;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.hero-split__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-card);
}

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

/* Hero grid homepage */
.hero-grid {
  padding: var(--space-lg) 0;
}

.hero-grid__main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero-grid__featured {
  grid-column: span 8;
}

.hero-grid__side {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.section-title {
  font-size: var(--font-size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--color-text);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-md);
}

/* Cards shadowed */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
}

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

.card__body { padding: var(--space-sm); }

.card__meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.card__title {
  font-size: 1rem;
  margin: 0 0 var(--space-xs);
}

.card__title a { text-decoration: none; }
.card__title a:hover { opacity: 0.7; }

.card__excerpt {
  font-size: var(--font-size-small);
  color: var(--color-muted);
  margin: 0;
}

/* Horizontal rows article list */
.article-rows { display: flex; flex-direction: column; gap: var(--space-md); }

.article-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s;
}

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

.article-row__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-soft);
  background: var(--color-surface);
}

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

.article-row__content h3 { margin-bottom: var(--space-xs); }
.article-row__content h3 a { text-decoration: none; }

/* Sidebar right-rail */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

.sidebar { position: sticky; top: calc(var(--header-height) + var(--space-sm)); }

.site-header.is-shrunk ~ main .sidebar,
body:has(.site-header.is-shrunk) .sidebar {
  top: calc(var(--header-height-shrunk) + var(--space-sm));
}

.sidebar-widget {
  background: var(--color-surface);
  padding: var(--space-sm);
  border-radius: var(--radius-soft);
  margin-bottom: var(--space-md);
}

.sidebar-widget h4 {
  font-size: var(--font-size-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.sidebar-links { list-style: none; margin: 0; padding: 0; }
.sidebar-links li { margin-bottom: var(--space-xs); }
.sidebar-links a { text-decoration: none; font-size: var(--font-size-small); }

/* Author card with avatar */
.author-card {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm);
  background: var(--color-surface);
  border-radius: var(--radius-soft);
  margin: var(--space-md) 0;
}

.author-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-text);
}

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

.author-card__name {
  font-weight: 700;
  font-size: 0.9375rem;
  margin: 0 0 4px;
}

.author-card__role {
  font-size: var(--font-size-small);
  color: var(--color-muted);
  margin: 0 0 var(--space-xs);
}

.author-card__bio {
  font-size: var(--font-size-small);
  margin: 0;
  line-height: 1.5;
}

/* Pull-quote-led article */
.article-header {
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.article-header .kicker {
  font-size: var(--font-size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.article-meta {
  font-size: var(--font-size-small);
  color: var(--color-muted);
  margin: var(--space-xs) 0 var(--space-sm);
}

.article-hero-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-soft);
  margin: var(--space-md) 0;
  box-shadow: var(--shadow-card);
}

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

.pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  background: var(--color-quote-bg);
  border-left: 4px solid var(--color-quote-border);
  font-style: italic;
}

.article-body {
  max-width: 680px;
}

.article-body p { margin-bottom: var(--space-sm); }

.article-body h2 {
  margin-top: var(--space-lg);
  font-size: 1.25rem;
}

.article-updated {
  font-size: var(--font-size-small);
  color: var(--color-muted);
  font-style: italic;
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.related-articles {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--color-text);
}

/* Opinion block */
.opinion-note {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-soft);
  font-size: var(--font-size-small);
  margin-bottom: var(--space-md);
}

.opinion-note strong { text-transform: uppercase; letter-spacing: 0.06em; }

/* Page content */
.page-content {
  padding: var(--space-lg) 0 var(--space-xl);
}

.page-content .lead {
  font-size: 1.0625rem;
  color: var(--color-muted);
  max-width: 720px;
}

.prose { max-width: 720px; }
.prose ul, .prose ol { margin: 0 0 var(--space-sm); padding-left: var(--space-md); }
.prose li { margin-bottom: var(--space-xs); }

/* Contact form */
.contact-form { max-width: 520px; margin-top: var(--space-md); }

.form-group { margin-bottom: var(--space-sm); }

.form-group label {
  display: block;
  font-size: var(--font-size-small);
  font-weight: 600;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-soft);
  background: var(--color-bg);
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-text);
}

/* Two-column footer */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

.site-footer a { color: var(--color-bg); }

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

.footer-brand .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
}

.footer-brand p {
  font-size: var(--font-size-small);
  opacity: 0.85;
  max-width: 360px;
}

.footer-links h4 {
  font-size: var(--font-size-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

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

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

.footer-links a {
  text-decoration: none;
  font-size: var(--font-size-small);
  opacity: 0.85;
}

.footer-links a:hover { opacity: 1; }

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Cookie bottom bar */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  transform: translateY(100%);
  transition: transform 0.35s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

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

.cookie-bar p {
  margin: 0;
  font-size: var(--font-size-small);
  flex: 1;
}

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

.cookie-bar .btn-filled {
  background: var(--color-bg);
  color: var(--color-text);
  flex-shrink: 0;
}

/* Feed compact list */
.feed-list { list-style: none; margin: 0; padding: 0; }

.feed-list li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

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

.feed-list a {
  text-decoration: none;
  font-size: var(--font-size-small);
  font-weight: 600;
}

.feed-list .feed-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* Categories row */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

/* Mobile */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-grid__featured,
  .hero-grid__side { grid-column: span 12; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .article-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .col-8, .col-4 { grid-column: span 12; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-text);
    display: none;
    padding: var(--space-sm);
  }

  .main-nav.is-open { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .site-header { position: sticky; }
  .header-inner { position: relative; }
}

@media (max-width: 600px) {
  .cookie-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
