/* Ar Claro — pneumo.digital
   Design: local-newspaper | muted-green | mixed-newsroom */

:root {
  --color-bg: #f7f9f4;
  --color-surface: #eef3e8;
  --color-paper: #ffffff;
  --color-text: #1e2e1e;
  --color-text-muted: #5a6b58;
  --color-border: #c8d4c0;
  --color-accent: #3d6b45;
  --color-accent-hover: #2d5234;
  --color-accent-light: #e4ede0;
  --color-overlay: rgba(20, 35, 22, 0.72);
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
  --radius: 2px;
  --header-top: 36px;
  --header-nav: 48px;
  --header-total: 84px;
  --header-shrink: 56px;
  --gap: 1.25rem;
  --transition: 0.22s ease;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  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;
  transition: color var(--transition);
}

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

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

h1 { font-size: 2.125rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 0.9375rem; font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1rem 1.25rem; }

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

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

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

.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1.5rem; }

/* ── Double-row nav header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.is-shrunk {
  box-shadow: 0 2px 12px rgba(30, 46, 30, 0.1);
}

.site-header.is-shrunk .header-top {
  display: none;
}

.site-header.is-shrunk .header-nav-inner {
  min-height: var(--header-shrink);
}

.header-top {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-top);
  gap: 1rem;
}

.header-date {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

.header-contact a {
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.header-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-nav);
  gap: 1rem;
  transition: min-height var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.logo img, .logo svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transition: width var(--transition), height var(--transition);
}

.site-header.is-shrunk .logo img,
.site-header.is-shrunk .logo svg {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1.1;
}

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

.logo-tagline {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--color-text);
}

/* ── Tags (uppercase-small) ── */
.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  padding: 0.15rem 0;
}

/* ── Buttons (outlined) ── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
}

.btn:hover {
  background: var(--color-accent);
  color: var(--color-paper);
}

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

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

/* ── Hero full-width overlay ── */
.hero-overlay {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-surface);
}

.hero-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.hero-overlay-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3rem 0 2.5rem;
  background: linear-gradient(to top, var(--color-overlay) 0%, transparent 100%);
}

.hero-overlay-content .container {
  max-width: 720px;
}

.hero-overlay h1 {
  font-size: 2.375rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-overlay .hero-excerpt {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.hero-meta time { color: rgba(255, 255, 255, 0.75); }

.hero-meta .tag {
  color: #b8d4b0;
  border: 1px solid rgba(184, 212, 176, 0.5);
  padding: 0.2rem 0.5rem;
}

.hero-meta .byline {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

.hero-overlay .btn {
  border-color: #fff;
  color: #fff;
}

.hero-overlay .btn:hover {
  background: #fff;
  color: var(--color-accent);
}

/* ── Featured story ── */
.featured-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background: var(--color-paper);
  transition: border-color var(--transition);
}

.featured-card:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.featured-card .card-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.featured-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card h2 {
  font-size: 1.375rem;
  margin: 0.5rem 0;
}

.featured-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.card-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

/* ── Magazine columns feed ── */
.feed-section {
  padding: 2rem 0 3rem;
}

.magazine-columns {
  column-count: 2;
  column-gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.magazine-columns > li {
  break-inside: avoid;
  margin-bottom: var(--gap);
}

/* ── Horizontal thumb cards ── */
.thumb-card {
  display: flex;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background: var(--color-paper);
  padding: 0.75rem;
  transition: border-color var(--transition);
}

.thumb-card:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.thumb-card-image {
  flex: 0 0 120px;
  width: 120px;
}

.thumb-card-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.thumb-card-body h3 {
  font-size: 0.9375rem;
  margin: 0.25rem 0 0.375rem;
  line-height: 1.3;
}

.thumb-card-body p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thumb-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.thumb-card-meta .byline-inline {
  font-style: italic;
}

/* ── Sidebar right-rail ── */
.sidebar {
  position: sticky;
  top: calc(var(--header-total) + 1rem);
  align-self: start;
}

.site-header.is-shrunk ~ main .sidebar,
.site-header.is-shrunk + main .sidebar {
  top: calc(var(--header-shrink) + 1rem);
}

.sidebar-block {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  padding: 1.125rem;
  margin-bottom: var(--gap);
}

.sidebar-block h3 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

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

.sidebar-list li {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.sidebar-list a {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: block;
  line-height: 1.35;
}

.sidebar-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.sidebar-tip {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  padding: 0.75rem;
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  margin-top: 0.5rem;
}

/* ── Prose / content sections ── */
.content-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.prose {
  max-width: 680px;
}

.prose h2 {
  margin: 1.75rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
}

/* ── Article sidebar layout ── */
.article-header {
  padding: 2rem 0 1.5rem;
  max-width: 720px;
}

.article-lead {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.article-byline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

.article-featured-image {
  margin-bottom: 1.5rem;
}

.article-featured-image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.article-body {
  font-size: 0.9375rem;
  line-height: 1.65;
}

.article-body h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.25rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1rem;
}

.article-body li { margin-bottom: 0.375rem; }

.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--color-accent);
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 0 0.75rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.related-articles {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-articles h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

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

.related-item {
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.875rem;
  transition: border-color var(--transition);
}

.related-item:hover { border-color: var(--color-accent); }

.related-item h3 {
  font-size: 0.9375rem;
  margin: 0.375rem 0;
}

.related-item .tag { margin-bottom: 0.25rem; }

/* ── Page header ── */
.page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header p {
  color: var(--color-text-muted);
  max-width: 560px;
}

/* ── Articles listing ── */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list .thumb-card {
  margin-bottom: var(--gap);
}

/* ── Contact form ── */
.contact-form {
  max-width: 480px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-paper);
  color: var(--color-text);
}

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

.form-notice {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
}

/* ── Editorial masthead footer ── */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 0;
  margin-top: 2rem;
}

.footer-masthead {
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 2rem;
}

.footer-masthead .logo-text {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.footer-masthead .masthead-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
}

.footer-masthead .masthead-desc {
  max-width: 520px;
  margin: 1rem auto 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-col h4 {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.875rem;
}

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

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

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

.footer-col a:hover { color: #b8d4b0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

/* ── Cookie bottom bar ── */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-paper);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 -4px 20px rgba(30, 46, 30, 0.12);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

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

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

.cookie-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 200px;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-actions .btn {
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .col-8, .col-4 { grid-column: span 12; }
  .featured-card { grid-template-columns: 1fr; }
  .magazine-columns { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-overlay h1 { font-size: 1.75rem; }
  .hero-overlay { min-height: 340px; }
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-border);
    display: none;
    padding: 0.75rem 1.25rem;
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }

  .header-nav-inner { position: relative; }

  .thumb-card-image { flex: 0 0 90px; width: 90px; }

  .cookie-inner { flex-direction: column; align-items: stretch; }
}
