/* Mercado Aberto — investbr.click | youth-media, indigo + coral + off-white */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,700;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --indigo-900: #312e81;
  --indigo-700: #4338ca;
  --indigo-500: #6366f1;
  --indigo-100: #e0e7ff;
  --coral: #f97316;
  --coral-soft: #ffedd5;
  --coral-dark: #ea580c;
  --off-white: #faf9f7;
  --off-white-warm: #fff7ed;
  --surface: #ffffff;
  --text: #1e1b4b;
  --text-muted: #64748b;
  --border: #c7d2fe;
  --border-light: #e2e8f0;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --max: 1180px;
  --read: 38rem;
  --gap: 1.35rem;
  --radius: 4px;
}

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

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--indigo-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--coral-dark); }

h1, h2, h3, .site-logo { font-family: var(--font-serif); font-weight: 700; }

/* Centered-logo header */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem var(--gap);
}

.header-brand {
  text-align: center;
  padding: 0.4rem 0 0.2rem;
}

.site-logo {
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--indigo-900);
  display: inline-block;
}

.site-logo em {
  font-style: italic;
  color: var(--coral);
  font-weight: 500;
}

.site-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0 0.7rem;
  position: relative;
}

.menu-toggle {
  display: none;
  position: absolute;
  left: 0;
  background: var(--indigo-700);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--indigo-700);
  border-bottom-color: var(--coral);
}

main { flex: 1; }

/* Hero grid */
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--gap) 2.5rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.hero-main {
  grid-column: span 7;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-main-image {
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

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

.hero-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 0.65rem;
}

.hero-main h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.hero-main h1 a {
  color: var(--indigo-900);
  text-decoration: none;
}

.hero-main h1 a:hover { color: var(--indigo-700); }

.hero-excerpt {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;
}

.hero-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-side {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* Bordered cards */
.hero-card {
  flex: 1;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.hero-card:hover { border-color: var(--coral); }

.hero-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-bottom: 2px solid var(--border);
}

.hero-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.story-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral);
  margin-bottom: 0.4rem;
}

.hero-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.hero-card h3 a {
  color: var(--indigo-900);
  text-decoration: none;
}

.hero-card h3 a:hover { color: var(--indigo-700); }

.story-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Newsletter strip */
.newsletter-strip {
  background: var(--indigo-900);
  color: #fff;
  padding: 2.25rem var(--gap);
}

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

.newsletter-text h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.newsletter-text p {
  font-size: 0.95rem;
  opacity: 0.88;
  max-width: 480px;
  line-height: 1.55;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 0.7rem 1rem;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.55); }

.newsletter-form button {
  padding: 0.7rem 1.35rem;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.newsletter-form button:hover { background: var(--coral-dark); }

.newsletter-status {
  width: 100%;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.9;
}

/* Main layout */
.main-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--gap) 3.5rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.content-primary { grid-column: span 8; }

.sidebar { grid-column: span 4; }

.section-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--indigo-700);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--coral);
  display: inline-block;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  list-style: none;
}

.story-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.story-card:hover { border-color: var(--coral); }

.story-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 2px solid var(--border);
}

.story-card-body { padding: 1.25rem 1.35rem 1.5rem; }

.story-card h3 {
  font-size: 1.08rem;
  line-height: 1.38;
  margin: 0.35rem 0 0.55rem;
}

.story-card h3 a {
  color: var(--indigo-900);
  text-decoration: none;
}

.story-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.55rem;
}

.sidebar-block {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: var(--gap);
}

.sidebar-block h2 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo-900);
  margin-bottom: 0.9rem;
}

.sidebar-list { list-style: none; }

.sidebar-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
}

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

.sidebar-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

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

/* Spacious magazine prose */
.prose {
  font-size: 1.08rem;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.prose > * + * { margin-top: 1.35rem; }

.prose h2 {
  font-size: 1.5rem;
  color: var(--indigo-900);
  margin-top: 2.25rem;
  letter-spacing: -0.02em;
}

/* Minimalist-reading articles */
.article-read {
  max-width: var(--read);
  margin: 0 auto;
  padding: 2.5rem var(--gap) 4rem;
}

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

.article-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--indigo-900);
  margin: 0.75rem 0 1.25rem;
}

.article-deck {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--indigo-100);
}

.byline-name {
  font-weight: 700;
  color: var(--indigo-900);
}

.byline-role {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.article-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

.article-dates .updated {
  display: block;
  margin-top: 0.2rem;
  font-style: italic;
}

.article-hero-img {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.92;
  letter-spacing: 0.012em;
}

.article-body > * + * { margin-top: 1.45rem; }

.article-body h2 {
  font-size: 1.45rem;
  color: var(--indigo-900);
  margin-top: 2.75rem;
  letter-spacing: -0.02em;
}

.article-body blockquote {
  border-left: 3px solid var(--coral);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
}

.related-block {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-block h2 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.15rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  list-style: none;
}

.related-item {
  background: var(--off-white-warm);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.related-item a {
  font-weight: 600;
  text-decoration: none;
  color: var(--indigo-900);
}

.related-item p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Page layouts */
.page-header {
  background: var(--indigo-900);
  color: #fff;
  padding: 3rem var(--gap);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  letter-spacing: -0.02em;
}

.page-header p {
  margin-top: 0.65rem;
  opacity: 0.9;
  font-size: 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem var(--gap) 4rem;
}

.articles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.articles-list-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.articles-list-item img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  border-right: 2px solid var(--border);
}

.articles-list-body { padding: 1.35rem 1.5rem; }

.articles-list-body h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0.35rem 0 0.5rem;
}

.articles-list-body h2 a {
  color: var(--indigo-900);
  text-decoration: none;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--indigo-900);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
  background: var(--surface);
}

.contact-form button {
  padding: 0.75rem 1.5rem;
  background: var(--indigo-700);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.contact-form button:hover { background: var(--indigo-900); }

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--indigo-700);
}

.author-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.author-avatar-lg {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--indigo-100);
}

.author-profile h1 {
  font-size: 1.85rem;
  color: var(--indigo-900);
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  background: var(--indigo-900);
  color: rgba(255,255,255,0.85);
  padding: 2.75rem var(--gap) 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-brand .site-logo { color: #fff; font-size: 1.5rem; }

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 0.65rem;
  opacity: 0.85;
}

.footer-nav h3,
.footer-legal h3 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.85rem;
  color: var(--coral);
}

.footer-nav ul,
.footer-legal ul { list-style: none; }

.footer-nav li,
.footer-legal li { margin-bottom: 0.45rem; }

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

.footer-nav a:hover,
.footer-legal a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  opacity: 0.7;
  text-align: center;
}

/* Cookie notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 1rem var(--gap);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(49, 46, 129, 0.08);
}

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

.cookie-notice p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 560px;
}

.cookie-notice button {
  padding: 0.55rem 1.2rem;
  background: var(--indigo-700);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-main { grid-column: span 12; grid-template-columns: 1fr; }
  .hero-side { grid-column: span 12; flex-direction: row; }
  .hero-card { min-width: 0; }
  .content-primary, .sidebar { grid-column: span 12; }
  .story-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    padding: 1rem var(--gap);
    gap: 0.5rem;
  }
  .header-nav.is-open { display: flex; }
  .header-bar { flex-wrap: wrap; }
  .hero-side { flex-direction: column; }
  .articles-list-item { grid-template-columns: 1fr; }
  .articles-list-item img { min-height: 180px; border-right: none; border-bottom: 2px solid var(--border); }
  .article-dates { margin-left: 0; width: 100%; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
}
