/* =====================================================================
   Leonel Querino 2026 — single page styles
   Design system: editorial, claro, com tipografia serif + sans clean.
   Paleta inspirada na foto (camiseta branca + bolsa vinho).
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* surfaces */
  --bg:        #f7f3ec;     /* off-white quente */
  --bg-alt:    #efe9dd;     /* cream um tom mais quente */
  --bg-dark:   #1a1110;     /* preto quente pra dark mode */
  --surface:   #ffffff;
  --line:      #e2d9c8;     /* divisor suave */

  /* text */
  --fg:        #14110f;
  --fg-muted:  #5a5048;
  --fg-inv:    #f7f3ec;
  --fg-inv-mu: #c8bdb1;

  /* accent (vinho da bolsa) */
  --accent:        #8c1f2a;
  --accent-dark:   #5c0e1a;
  --accent-light:  #c44557;
  --accent-soft:   rgba(140, 31, 42, 0.10);

  /* highlight */
  --gold:      #d4a82a;
  --green:     #2d5a3d;

  /* type */
  --serif:  "Source Serif 4", "Source Serif Pro", "Playfair Display",
            Georgia, "Times New Roman", serif;
  --sans:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;

  /* sizes (clamp p/ responsividade fluida) */
  --step--1: clamp(0.83rem, 0.78rem + 0.25vw, 0.95rem);
  --step-0:  clamp(1.00rem, 0.95rem + 0.30vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.10rem + 0.50vw, 1.42rem);
  --step-2:  clamp(1.44rem, 1.25rem + 0.95vw, 1.80rem);
  --step-3:  clamp(1.73rem, 1.40rem + 1.65vw, 2.45rem);
  --step-4:  clamp(2.07rem, 1.55rem + 2.60vw, 3.30rem);
  --step-5:  clamp(2.49rem, 1.70rem + 3.95vw, 4.40rem);

  /* spacing */
  --gap-1: 0.5rem;
  --gap-2: 0.75rem;
  --gap-3: 1rem;
  --gap-4: 1.5rem;
  --gap-5: 2rem;
  --gap-6: 3rem;
  --gap-7: 4.5rem;
  --gap-8: 6rem;

  /* layout */
  --wrap: 1140px;
  --wrap-narrow: 720px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 17, 15, 0.06),
               0 1px 1px rgba(20, 17, 15, 0.04);
  --shadow-md: 0 12px 28px -16px rgba(20, 17, 15, 0.25),
               0 4px 10px -4px rgba(20, 17, 15, 0.08);
  --shadow-lg: 0 28px 60px -28px rgba(20, 17, 15, 0.35),
               0 8px 18px -8px rgba(20, 17, 15, 0.10);
}

/* dark mode (honra o sistema) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14110f;
    --bg-alt:    #1d1815;
    --surface:   #221b18;
    --line:      #322a25;
    --fg:        #f4ece1;
    --fg-muted:  #b9ad9e;
    --fg-inv:    #14110f;
    --fg-inv-mu: #5a5048;
    --accent-soft: rgba(196, 69, 87, 0.18);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 12px 28px -16px rgba(0,0,0,0.6),
                 0 4px 10px -4px rgba(0,0,0,0.4);
    --shadow-lg: 0 28px 60px -28px rgba(0,0,0,0.7),
                 0 8px 18px -8px rgba(0,0,0,0.45);
  }
}

/* ---------- Reset enxuto ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.15; overflow-wrap: break-word; word-wrap: break-word; }
p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.wrap.narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }

.skip {
  position: absolute;
  inset: auto auto auto -9999px;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
}
.skip:focus { inset: 0.5rem auto auto 0.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-block: 0.85rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--step-1);
  white-space: nowrap;
  flex-shrink: 0;
}
.brand:hover { color: var(--fg); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
}
.brand-name { line-height: 1; }

.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step--1);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  position: relative;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .site-nav { gap: clamp(0.6rem, 2vw, 1.4rem); }
  .site-nav a { font-size: inherit; padding: 0.4rem 0.6rem; }
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.6rem; right: 0.6rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 400px at 110% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%),
    var(--bg);
}
.hero-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

.hero-photo {
  margin: 0;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: #fff;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  justify-self: center;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.hero-photo::after {
  /* vinheta discreta pra dar profundidade */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.18));
  pointer-events: none;
}
.hero-photo-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  z-index: 1;
}
.hero-photo-cap span:first-child { font-weight: 600; }
.hero-photo-cap span:last-child  { opacity: 0.8; }

.hero-text { max-width: 38rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
}
.hero h1 {
  font-family: var(--serif);
  font-size: var(--step-5);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.hero h1 .sub {
  display: block;
  font-family: var(--sans);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fg-muted);
  margin-top: 0.6rem;
}
.hero h1 .sub strong {
  color: var(--accent);
  font-weight: 700;
}
.lead {
  font-size: var(--step-1);
  color: var(--fg);
  line-height: 1.6;
  max-width: 36rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.lead em { font-style: italic; color: var(--accent-dark); font-weight: 600; }
.lead strong { color: var(--fg); font-weight: 700; }

.hero-cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
  cursor: pointer;
  line-height: 1.1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--fg);
}
.btn-ghost:hover { background: var(--fg); color: var(--bg); }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.hero-tags li {
  font-size: var(--step--1);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

/* ---------- Sections genéricas ---------- */
.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }
.section-head {
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 50rem;
}
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section h2 {
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}
.section-sub {
  color: var(--fg-muted);
  font-size: var(--step-1);
  max-width: 36rem;
}
.center .section-sub { margin-inline: auto; }

/* ---------- Prose (bio) ---------- */
.prose p {
  font-size: var(--step-1);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: var(--fg);
  max-width: 40rem;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--accent-dark); font-weight: 700; }
.prose em { font-style: italic; }

.bio-stats {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 720px) {
  .bio-stats { grid-template-columns: repeat(4, 1fr); }
}
.bio-stats > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
}
.bio-stats > div::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
}
.stat-num {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: var(--step--1);
  color: var(--fg-muted);
  line-height: 1.3;
}

/* ---------- Cards de bandeiras ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 720px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
}
.card-ambulantes::before  { background: var(--accent); }
.card-informal::before    { background: var(--green); }
.card-antifascismo::before{ background: var(--gold); }
.card-tag {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.card-ambulantes .card-tag   { color: var(--accent); }
.card-informal .card-tag     { color: var(--green); }
.card-antifascismo .card-tag { color: var(--gold); }
.card h3 {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--fg-muted);
  font-size: var(--step-0);
  line-height: 1.6;
}

/* ---------- Contato ---------- */
.contact-email {
  margin: 1.5rem 0 1.25rem;
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 700;
  max-width: 100%;
}
.contact-email a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
}
.contact-email a:hover { color: var(--accent-dark); border-color: var(--accent-dark); }
.muted { color: var(--fg-muted); }
.small { font-size: var(--step--1); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 2.5rem;
  background: var(--bg);
  color: var(--fg-muted);
}
.footer-wrap p { margin-bottom: 0.4rem; }
.footer-wrap p:last-child { margin-bottom: 0; }

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

/* ---------- visually-bg ----------
   Mantido no DOM (semantica/SEO/JSON-LD) mas invisivel visualmente:
   cor do texto == cor do fundo. Usado em elementos que o user pediu
   pra esconder mantendo no HTML. Colocado NO FINAL pra ter prioridade
   sobre regras anteriores de mesma especificidade. */
.visually-bg,
.visually-bg a,
.visually-bg a:hover,
.visually-bg a:focus {
  color: var(--bg) !important;
  text-decoration: none !important;
  border: 0 !important;
  background: transparent !important;
}

/* ---------- Print ---------- */
@media print {
  :root {
    --bg: #fff; --bg-alt: #fff; --fg: #000; --fg-muted: #333;
    --line: #ccc;
  }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .hero-cta, .skip { display: none !important; }
  .section { border: none; padding-block: 1.2rem; }
  .card, .bio-stats > div, .hero-photo { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after, a[href^="mailto"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}
