/* Margem Oncológica — terracotta-warm culture-desk editorial */

:root {
  --terracotta: #c45c3e;
  --terracotta-dark: #a34a32;
  --terracotta-light: #e8a87c;
  --cream: #faf6f1;
  --cream-dark: #f0e6db;
  --ink: #3d2b26;
  --ink-muted: #6b5349;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 12px;
  --container: 1140px;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 4px 24px rgba(61, 43, 38, 0.08);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18px; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--cream); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--terracotta-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terracotta); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

.site-header { background: var(--white); border-bottom: 1px solid var(--cream-dark); position: sticky; top: 0; z-index: 100; }
.header-split { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; max-width: var(--container); margin: 0 auto; }
.logo { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.logo span { color: var(--terracotta); }
.logo:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.nav-primary a { font-size: 0.875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.nav-primary a:hover, .nav-primary a.active { color: var(--terracotta); }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--ink); }

.nav-categories { border-top: 1px solid var(--cream-dark); background: var(--cream); }
.nav-categories .container { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.tag { display: inline-block; padding: 0.35rem 1rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; transition: transform var(--transition); }
.tag:hover { transform: translateY(-1px); }
.tag-tratamento { background: #f5ddd4; color: #8b3a28; }
.tag-diagnostico { background: #e8dfd4; color: #5c4a3a; }
.tag-pesquisa { background: #f0e0d0; color: #7a4530; }
.tag-sus { background: #dce8e0; color: #2d5a40; }
.tag-historias { background: #f2e4d8; color: #6b3d2e; }
.tag-prevencao { background: #ede4d8; color: #5a4035; }
.tag-inca { background: #e0ddd8; color: #4a3d38; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.lead { font-size: 1.2rem; line-height: 1.8; color: var(--ink-muted); margin-bottom: 2rem; }
.prose p { margin-bottom: 1.5rem; }
.prose p:last-child { margin-bottom: 0; }

.btn { display: inline-block; padding: 0.65rem 1.5rem; border: 2px solid var(--terracotta); border-radius: var(--radius-sm); background: transparent; color: var(--terracotta-dark); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; transition: background var(--transition), color var(--transition); }
.btn:hover { background: var(--terracotta); color: var(--white); }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-dark:hover { background: var(--ink); color: var(--white); }

.hero { position: relative; width: 100%; min-height: 72vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(61, 43, 38, 0.88) 0%, rgba(61, 43, 38, 0.4) 50%, rgba(61, 43, 38, 0.15) 100%); }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto; padding: 4rem 1.5rem 3.5rem; color: var(--white); }
.hero-content .tag { margin-bottom: 1rem; }
.hero-content h1 { max-width: 18ch; margin-bottom: 1rem; }
.hero-content .lead { color: rgba(255, 255, 255, 0.85); max-width: 42ch; margin-bottom: 1.75rem; }
.hero-meta { font-size: 0.85rem; opacity: 0.8; letter-spacing: 0.05em; text-transform: uppercase; }

.bento-section { padding: 4rem 0 2rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2.5rem; padding: 0 1.5rem; max-width: var(--container); margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: 0; }
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.bento-item { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 280px; }
.bento-item.span-8 { grid-column: span 8; }
.bento-item.span-4 { grid-column: span 4; }
.bento-item.span-6 { grid-column: span 6; }
.bento-item.span-5 { grid-column: span 5; }
.bento-item.span-7 { grid-column: span 7; }
.bento-item.tall { min-height: 380px; }

.card-overlay { position: relative; display: block; height: 100%; min-height: inherit; color: var(--white); }
.card-overlay img, .card-overlay svg { width: 100%; height: 100%; object-fit: cover; min-height: inherit; transition: transform 0.5s ease; }
.card-overlay:hover img, .card-overlay:hover svg { transform: scale(1.04); }
.card-overlay::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(61, 43, 38, 0.9) 0%, rgba(61, 43, 38, 0.2) 60%); border-radius: var(--radius); }
.card-overlay-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.75rem; z-index: 2; }
.card-overlay-body .tag { margin-bottom: 0.75rem; }
.card-overlay-body h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--white); }
.card-overlay-body .date { font-size: 0.8rem; opacity: 0.75; text-transform: lowercase; }

.article-feed { padding: 3rem 0 5rem; }
.article-row { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: center; padding: 2rem 0; border-bottom: 1px solid var(--cream-dark); max-width: var(--container); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.article-row:first-child { padding-top: 0; }
.article-row-thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.article-row-thumb img, .article-row-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.article-row-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.article-row-content h3 a { color: var(--ink); }
.article-row-content h3 a:hover { color: var(--terracotta); }
.article-row-content .excerpt { color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 0.75rem; line-height: 1.65; }
.article-row-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-size: 0.8rem; color: var(--ink-muted); }

.author-card { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--cream-dark); margin: 2.5rem 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 3px solid var(--cream-dark); }
.author-avatar svg, .author-avatar img { width: 100%; height: 100%; }
.author-info strong { display: block; font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: 0.15rem; }
.author-info span { font-size: 0.85rem; color: var(--ink-muted); }

.article-hero { position: relative; width: 100%; height: 55vh; min-height: 400px; overflow: hidden; }
.article-hero img, .article-hero svg { width: 100%; height: 100%; object-fit: cover; }
.article-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(61, 43, 38, 0.75), transparent 50%); }
.article-header { max-width: 720px; margin: -6rem auto 0; position: relative; z-index: 2; padding: 0 1.5rem; }
.article-header .tag { margin-bottom: 1rem; }
.article-header h1 { color: var(--white); text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.article-header .article-meta { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-top: 1rem; }
.article-body { max-width: 720px; margin: 3rem auto 4rem; padding: 0 1.5rem; }
.article-body .lead { font-family: var(--font-serif); font-size: 1.3rem; color: var(--ink); }
.full-bleed-image { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); margin-top: 3rem; margin-bottom: 3rem; }
.full-bleed-image img, .full-bleed-image svg { width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.pullquote { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.5; color: var(--terracotta-dark); border-left: 4px solid var(--terracotta); padding: 1rem 0 1rem 1.5rem; margin: 2.5rem 0; font-style: italic; }

.page-hero-simple { padding: 4rem 0 3rem; background: var(--white); border-bottom: 1px solid var(--cream-dark); }
.page-hero-simple h1 { max-width: var(--container); margin: 0 auto 1rem; padding: 0 1.5rem; }
.page-hero-simple .lead { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }
.contact-info { background: var(--white); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--cream-dark); }
.contact-info h3 { margin-bottom: 1rem; }

.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.75); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem 3rem; }
.footer-brand .logo { color: var(--white); margin-bottom: 1rem; display: inline-block; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 36ch; }
.footer-links h4 { font-family: var(--font-sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terracotta-light); margin-bottom: 1.25rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
.footer-links a:hover { color: var(--terracotta-light); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; text-align: center; font-size: 0.8rem; max-width: var(--container); margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.cookie-popup { position: fixed; bottom: 1.5rem; right: 1.5rem; max-width: 360px; background: var(--white); border: 1px solid var(--cream-dark); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); z-index: 1000; transform: translateY(120%); opacity: 0; transition: transform 0.4s ease, opacity 0.4s ease; }
.cookie-popup.visible { transform: translateY(0); opacity: 1; }
.cookie-popup p { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 1rem; line-height: 1.6; }

.mobile-nav { display: none; position: fixed; inset: 0; background: var(--cream); z-index: 200; padding: 2rem; flex-direction: column; gap: 1.5rem; }
.mobile-nav.open { display: flex; }
.mobile-nav a { font-family: var(--font-serif); font-size: 1.5rem; color: var(--ink); }
.mobile-nav-close { align-self: flex-end; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

.asymmetric-block { padding: 5rem 0 2rem; }
.editorial-intro { max-width: 580px; margin: 0 auto 4rem; padding: 0 1.5rem; padding-left: 4rem; }
.articles-grid-header { padding: 3rem 0 1rem; }

@media (max-width: 900px) {
  .bento-item.span-8, .bento-item.span-4, .bento-item.span-6, .bento-item.span-5, .bento-item.span-7 { grid-column: span 12; }
  .article-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-grid, .contact-grid { grid-template-columns: 1fr; }
  .nav-primary { display: none; }
  .menu-toggle { display: block; }
  .editorial-intro { padding-left: 1.5rem; }
  .hero { min-height: 60vh; }
}
@media (max-width: 600px) {
  html { font-size: 16px; }
  .cookie-popup { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
}
