/* =============================================================================
   Blog Tempus — estilo público. Mobile-first.
   Brand guide: navy #093759, laranja #FF7F00 (≤10%, só acento), branco.
   Fonte display: Oscine. Corpo: stack do sistema (Avenir-like).
   ============================================================================= */

@font-face {
  font-family: "Oscine";
  src: url("/static/fonts/Oscine-Regular.woff2") format("woff2"),
       url("/static/fonts/Oscine-Regular.woff") format("woff");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Oscine";
  src: url("/static/fonts/Oscine-Bold.woff2") format("woff2"),
       url("/static/fonts/Oscine-Bold.woff") format("woff");
  font-weight: 700; font-display: swap;
}

:root {
  --navy: #093759;
  --navy-700: #072845;
  --navy-500: #13597F;
  --orange: #FF7F00;
  --orange-soft: #FFF2E6;
  --ink: #1b2733;
  --muted: #555555;
  --line: #e6ebf1;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --brand: var(--navy);

  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(9, 55, 89, .10);
  --shadow-hover: 0 18px 44px rgba(9, 55, 89, .16);
  --sp: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* Fundo decorativo (glows sutis) */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .12; }
.bg__glow--orange { width: 380px; height: 380px; background: var(--orange); top: -120px; right: -80px; }
.bg__glow--blue { width: 460px; height: 460px; background: var(--navy-500); bottom: -160px; left: -120px; opacity: .10; }

/* ---------------- Header ---------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 12px; height: 12px; border-radius: 3px; background: var(--orange); transform: translateY(1px);
  box-shadow: 0 0 0 4px rgba(255,127,0,.14); }
.brand__name { font-family: "Oscine", serif; font-weight: 700; font-size: 1.3rem; letter-spacing: .2px; }
.brand__tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--navy); font-weight: 500; font-size: .95rem; }
.nav__link:hover { background: var(--bg-soft); text-decoration: none; }

.search { display: flex; align-items: center; margin-left: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; }
.search__input { border: 0; background: transparent; outline: none; font: inherit; width: 140px; padding: 6px 4px; }
.search__btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; cursor: pointer;
  border-radius: 999px; background: var(--navy); color: #fff; }
.search__btn svg { width: 16px; height: 16px; }
.search__btn:hover { background: var(--navy-500); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 38px; padding: 9px 8px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.nav-toggle span { height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }

/* ---------------- Main / Hero ---------------- */
.main { padding-block: 40px 64px; }
.hero { padding: 16px 0 28px; }
.hero--sub { padding-bottom: 18px; }
.hero__kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,127,0,.16); }
.hero__title { font-family: "Oscine", serif; font-weight: 700; color: var(--navy);
  font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.12; margin: 0; max-width: 22ch; }

/* ---------------- Grid de cards ---------------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
/* Cantos modulares (assinatura Tempus) */
.card__corner { position: absolute; width: 14px; height: 14px; z-index: 2; pointer-events: none; }
.card__corner--tl { top: 10px; left: 10px; border-top: 2px solid var(--orange); border-left: 2px solid var(--orange); }
.card__corner--br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--navy); border-right: 2px solid var(--navy); }

.post-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card__link:hover { text-decoration: none; }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__title { font-family: "Oscine", serif; color: var(--navy); font-size: 1.18rem; line-height: 1.25; margin: 0; }
.post-card__excerpt { color: var(--muted); font-size: .94rem; margin: 0; }
.post-card__meta { color: #8a97a3; font-size: .8rem; margin-top: auto; }
.post-card__cta { color: var(--orange); font-weight: 600; font-size: .9rem; }

.post-card--feature { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .post-card--feature { grid-column: 1 / -1; }
  .post-card--feature .post-card__link { flex-direction: row; }
  .post-card--feature .post-card__media { flex: 1 1 55%; aspect-ratio: auto; }
  .post-card--feature .post-card__body { flex: 1 1 45%; justify-content: center; padding: 32px; }
  .post-card--feature .post-card__title { font-size: 1.8rem; }
  .post-card--feature .post-card__excerpt { font-size: 1.02rem; }
}

.tag { align-self: flex-start; background: var(--orange-soft); color: #b65a00; font-weight: 600;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }

/* ---------------- Paginação ---------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; }
.pager__btn { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); font-weight: 600; }
.pager__btn:hover { background: var(--navy); color: #fff; text-decoration: none; }
.pager__page { color: var(--muted); font-size: .9rem; }

.empty, .search-count { color: var(--muted); }
.empty { padding: 48px 0; text-align: center; font-size: 1.05rem; }
.search-count { margin: 0 0 20px; }

/* ---------------- Artigo ---------------- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.article { max-width: 760px; margin-inline: auto; }
.article__head { margin-bottom: 22px; }
.article__title { font-family: "Oscine", serif; color: var(--navy); line-height: 1.12;
  font-size: clamp(1.9rem, 5vw, 3rem); margin: 12px 0 10px; }
.article__meta { color: #8a97a3; font-size: .9rem; margin: 0; }
.article__cover { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.prose { font-size: 1.08rem; color: #2a3744; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: "Oscine", serif; color: var(--navy); font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-family: "Oscine", serif; color: var(--navy); font-size: 1.3rem; margin-top: 1.5em; }
.prose a { color: var(--navy-500); text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; box-shadow: var(--shadow); }
.prose blockquote { margin: 1.4em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--orange);
  color: var(--navy); font-style: italic; }
.prose pre { background: var(--navy-700); color: #e8f0f7; padding: 18px; border-radius: var(--radius-sm); overflow:auto; }
.prose code { background: var(--bg-soft); padding: .15em .4em; border-radius: 4px; font-size: .92em; }
.prose pre code { background: transparent; padding: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }

.related { margin-top: 64px; }
.related__title { font-family: "Oscine", serif; color: var(--navy); font-size: 1.4rem; margin-bottom: 20px; }

/* ---------------- Footer ---------------- */
.site-foot { background: var(--navy); color: #cfe0ee; margin-top: 40px; }
.site-foot__inner { padding-block: 36px; }
.eco { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 20px; }
.eco__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; color: #8fb3cf; }
.eco__list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.eco__item { display: inline-block; padding: 7px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  color: #eaf2f9; font-size: .9rem; }
.eco__item:hover { background: var(--orange); border-color: var(--orange); color: #fff; text-decoration: none; }
.eco__item--ativo { background: rgba(255,127,0,.18); border-color: var(--orange); color: #fff; }
.site-foot__legal { font-size: .85rem; color: #9db8cf; margin: 0; }

/* ---------------- Mobile nav ---------------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 20px 22px;
    box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s; }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { padding: 12px 10px; border-radius: 10px; }
  .search { margin: 8px 0 0; }
  .search__input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
