/* Mostruário — vitrinebr.digital | palette: soft-neutral | archetype: photo-reportage */

:root {
  --bg: #f6f3ef;
  --bg-alt: #ede8e1;
  --surface: #fffcf8;
  --text: #2a2826;
  --text-muted: #6e6862;
  --accent: #9a8570;
  --accent-soft: #c9b9a8;
  --border: #ddd6cc;
  --overlay: rgba(42, 40, 38, 0.55);
  --radius: 14px;
  --radius-sm: 12px;
  --container: 1140px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --transition: 0.25s ease;
}

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

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

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }

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

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

/* Header — centered logo */
.site-header {
  padding: var(--space-md) 0 var(--space-sm);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

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

.logo svg { width: 36px; height: 36px; }

.logo-text {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Nav — horizontal underline */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.75rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

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

/* Hero — full-width image + overlay */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--overlay) 0%, rgba(42,40,38,0.15) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  color: #fff;
}

.hero-content h1 {
  max-width: 18ch;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-content p {
  max-width: 42ch;
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: var(--space-md);
}

/* Tags — bracket label */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.tag::before { content: "[ "; }
.tag::after { content: " ]"; }

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

/* Buttons — subtle ghost */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-neutral {
  color: var(--text);
  border-color: var(--border);
}

.btn-neutral:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* Featured story */
.featured-story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-xl);
  padding-block: var(--space-md);
}

.featured-story.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.featured-story.reverse .featured-visual { order: 2; }

.featured-visual img,
.featured-visual svg {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.featured-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.featured-meta time { font-style: italic; }

/* Magazine columns — article list */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.section-header h2 { margin: 0; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* Cards — stacked text below */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(42,40,38,0.08);
}

.card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-alt);
}

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

.card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

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

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

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: var(--space-sm);
}

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

/* Magazine breakout grid */
.breakout-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
  margin-block: var(--space-lg);
}

.breakout-wide {
  grid-column: 1 / -1;
}

.breakout-left {
  grid-column: 1 / 8;
}

.breakout-right {
  grid-column: 8 / -1;
}

.breakout-offset {
  grid-column: 2 / 11;
}

/* Full-bleed images */
.full-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.full-bleed img,
.full-bleed svg,
.full-bleed figure img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 0;
}

.full-bleed figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  font-style: italic;
}

/* Article layout — sticky TOC sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: var(--space-lg);
  align-items: start;
  margin-block: var(--space-lg);
}

.article-toc {
  position: sticky;
  top: 120px;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-toc h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.article-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
}

.article-toc li { margin-bottom: 0.5rem; }

.article-toc a {
  text-decoration: none;
  color: var(--text-muted);
}

.article-toc a:hover,
.article-toc a.active { color: var(--accent); }

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

.article-main .lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.article-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.article-meta .updated {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

/* Author — sidebar bio box */
.author-box {
  position: sticky;
  top: 120px;
  padding: var(--space-md);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.author-box img,
.author-box svg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
}

.author-box h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.author-box .role {
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

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

/* Prose */
.prose h2 {
  margin-top: var(--space-lg);
  scroll-margin-top: 130px;
}

.prose h3 {
  margin-top: var(--space-md);
  scroll-margin-top: 130px;
}

.prose blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--accent-soft);
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  font-style: italic;
}

.prose ul, .prose ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.4rem;
}

.prose li { margin-bottom: 0.4rem; }

/* Page hero (inner pages) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-md);
  text-align: center;
}

.page-hero h1 { margin-bottom: var(--space-sm); }

.page-hero p {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--text-muted);
}

/* Content page */
.content-page {
  max-width: 720px;
  margin: 0 auto var(--space-xl);
}

.content-page.wide { max-width: 860px; }

/* Contact form */
.contact-form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

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

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

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

.contact-info {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-alt);
  border-radius: var(--radius);
}

/* Related articles */
.related-articles {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.related-articles h3 { margin-bottom: var(--space-md); }

.related-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-list a {
  text-decoration: none;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.05rem;
}

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

/* Footer — editorial masthead */
.site-footer {
  background: var(--text);
  color: #d4cfc8;
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-masthead {
  text-align: center;
  margin-bottom: var(--space-lg);
}

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

.footer-masthead .edition {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
  margin-bottom: var(--space-sm);
}

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

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

.footer-col a {
  color: #d4cfc8;
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: #8a8480;
  padding-top: var(--space-md);
  border-top: 1px solid #3d3a37;
}

/* Cookie — corner popup */
.cookie-popup {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: 340px;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(42,40,38,0.15);
  z-index: 1000;
  transform: translateY(calc(100% + 2rem));
  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;
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
}

.cookie-popup .btn { margin-right: 0.5rem; }

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

/* Mixed asymmetric spacing utilities */
.asymmetric-block {
  padding: var(--space-md) var(--space-lg) var(--space-lg) var(--space-sm);
}

.offset-left { margin-left: clamp(0rem, 4vw, 3rem); }
.offset-right { margin-right: clamp(0rem, 4vw, 3rem); }

/* Articles listing magazine columns */
.articles-magazine {
  column-count: 2;
  column-gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.articles-magazine .card {
  break-inside: avoid;
  margin-bottom: var(--space-md);
}

/* Mobile */
@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc,
  .author-box {
    position: static;
  }

  .featured-story,
  .featured-story.reverse {
    grid-template-columns: 1fr;
  }

  .featured-story.reverse .featured-visual { order: 0; }

  .article-grid { grid-template-columns: repeat(2, 1fr); }

  .breakout-left,
  .breakout-right,
  .breakout-offset { grid-column: 1 / -1; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

  .main-nav {
    display: none;
    width: 100%;
  }

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

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) 0;
  }

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

  .articles-magazine { column-count: 1; }

  .related-list { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .hero { min-height: 50vh; }

  .cookie-popup {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
