/*
Theme Name: Datini Editorial
Theme URI: https://datini.com.br/
Author: Datini Tecnologia LTDA
Author URI: https://datini.com.br/
Description: Tema editorial WordPress inspirado na identidade visual da Datini: clareza, rigor e conteúdo sem ruído.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: datini
Tags: blog, news, dark, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ink: #151f28;
  --ink-deep: #101820;
  --paper: #f5f5f2;
  --white: #fff;
  --blue: #2ea7df;
  --muted: rgba(255,255,255,.62);
  --line: rgba(255,255,255,.13);
  --content: 1180px;
  --reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--white); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 17px; line-height: 1.68; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--blue); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
::selection { background: var(--blue); color: var(--ink-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(100% - 48px, var(--content)); margin-inline: auto; }
.site-main { flex: 1; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; padding: 12px 16px; margin: 8px; background: var(--white); color: var(--ink); z-index: 999; }

.site-header { padding: 34px 0 28px; border-bottom: 1px solid transparent; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.brand-mark { position: relative; width: 31px; height: 36px; flex: 0 0 31px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: 2px; width: 14px; height: 30px; }
.brand-mark::before { left: 0; background: var(--white); border-radius: 18px 0 0 18px; }
.brand-mark::after { right: 0; top: 6px; background: var(--blue); border-radius: 0 18px 18px 0; }
.custom-logo { width: auto; max-height: 44px; }
.site-nav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: rgba(255,255,255,.78); font-size: 14px; text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--white); }
.menu-toggle { display: none; padding: 8px 0; color: var(--white); background: transparent; border: 0; cursor: pointer; }

.eyebrow { margin: 0 0 22px; color: var(--blue); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.hero { padding: clamp(70px, 10vw, 140px) 0 80px; }
.hero h1, .page-title { max-width: 980px; margin: 0; font-size: clamp(48px, 7vw, 82px); line-height: 1.01; letter-spacing: -.045em; font-weight: 600; }
.hero-copy { max-width: 660px; margin-top: 48px; color: rgba(255,255,255,.78); font-size: clamp(18px, 2vw, 21px); }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border: 1px solid var(--white); background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none; transition: .2s ease; }
.button:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); transform: translateY(-2px); }
.button--ghost { background: transparent; color: var(--white); border-color: var(--line); }

.logo-divider { display: flex; align-items: center; width: 72px; height: 80px; margin: 30px 0 64px; }
.logo-divider span { width: 34px; height: 64px; }
.logo-divider span:first-child { background: var(--white); border-radius: 40px 0 0 40px; }
.logo-divider span:last-child { height: 58px; background: var(--blue); border-radius: 0 40px 40px 0; transform: translateY(6px); }

.section { padding: 76px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.section-title { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.035em; }
.section-link { color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }

.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.post-card { position: relative; display: flex; min-height: 420px; flex-direction: column; padding: 30px; background: var(--ink); }
.post-card:hover { background: var(--ink-deep); }
.post-card__image { aspect-ratio: 16/10; margin: -30px -30px 28px; overflow: hidden; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card__image img { transform: scale(1.025); }
.post-card__meta, .entry-meta { display: flex; flex-wrap: wrap; gap: 9px 18px; color: var(--blue); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.post-card > .term-chips { margin-top: 14px; }
.article-header .term-chips { margin-top: 20px; }
.term-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); color: rgba(255,255,255,.76); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; line-height: 1.2; text-decoration: none; }
.term-chip:hover { border-color: var(--blue); color: var(--white); }
.term-chip__dot { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 3px rgba(46,167,223,.13); }
.term-chip--tag { border-radius: 99px; }
.post-card__title { margin: 18px 0 14px; font-size: 26px; line-height: 1.12; letter-spacing: -.025em; }
.post-card__title a { text-decoration: none; }
.post-card__excerpt { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.post-card__arrow { margin-top: auto; color: var(--white); font-size: 24px; }

.archive-header { padding: 86px 0 58px; }
.breadcrumbs { margin-bottom: 30px; color: var(--muted); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; letter-spacing: .04em; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: rgba(255,255,255,.25); }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current="page"] { color: rgba(255,255,255,.78); }
.archive-description { max-width: 650px; margin-top: 28px; color: var(--muted); }
.taxonomy-symbol { display: grid; width: 64px; height: 64px; margin-bottom: 30px; place-items: center; }
.taxonomy-symbol--category { display: flex; align-items: center; }
.taxonomy-symbol--category span { width: 29px; height: 58px; }
.taxonomy-symbol--category span:first-child { background: var(--white); border-radius: 34px 0 0 34px; }
.taxonomy-symbol--category span:last-child { height: 52px; background: var(--blue); border-radius: 0 34px 34px 0; transform: translateY(5px); }
.taxonomy-symbol--tag { border: 1px solid var(--line); color: var(--blue); font: 28px/1 "SFMono-Regular", Consolas, monospace; }
.archive-list { padding-bottom: 90px; }
.pagination { margin-top: 46px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { min-width: 44px; padding: 8px 13px; border: 1px solid var(--line); text-align: center; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--white); color: var(--ink); }

.article-header { padding: clamp(70px, 10vw, 130px) 0 58px; }
.article-title { max-width: 1040px; margin: 18px 0 30px; font-size: clamp(44px, 7vw, 76px); line-height: 1.02; letter-spacing: -.045em; }
.article-deck { max-width: 760px; color: var(--muted); font-size: 21px; }
.featured-image { width: min(100% - 48px, 1320px); margin: 0 auto 74px; }
.featured-image img { width: 100%; max-height: 720px; object-fit: cover; }
.entry-content { width: min(100% - 48px, var(--reading)); margin: 0 auto; padding-bottom: 84px; color: rgba(255,255,255,.86); font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.8; }
.entry-content > * { margin-top: 0; margin-bottom: 1.45em; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--white); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.16; letter-spacing: -.03em; }
.entry-content h2 { margin-top: 2em; font-size: 38px; }
.entry-content h3 { margin-top: 1.8em; font-size: 28px; }
.entry-content blockquote { margin: 2.2em 0; padding: 0 0 0 28px; border-left: 4px solid var(--blue); color: var(--white); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 27px; line-height: 1.4; }
.entry-content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .82em; }
.entry-content pre { overflow-x: auto; padding: 22px; background: var(--ink-deep); border: 1px solid var(--line); }
.entry-content a { color: var(--blue); }
.entry-content figcaption { color: var(--muted); font: 13px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.entry-footer { width: min(100% - 48px, var(--reading)); margin: 0 auto 70px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.post-navigation { width: min(100% - 48px, var(--content)); margin: 0 auto 76px; padding-top: 36px; border-top: 1px solid var(--line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.nav-previous a, .nav-next a { display: block; text-decoration: none; }
.nav-next { text-align: right; }

.comments-area { width: min(100% - 48px, var(--reading)); margin: 0 auto 90px; padding-top: 44px; border-top: 1px solid var(--line); }
.comment-list { padding: 0; list-style: none; }
.comment-body { margin: 28px 0; padding: 24px; background: rgba(255,255,255,.035); }
.comment-meta { font-size: 13px; color: var(--muted); }
.comment-form label { display: block; margin-bottom: 5px; font-size: 13px; }
.comment-form input:not([type=submit]), .comment-form textarea, .search-form input { width: 100%; padding: 13px 14px; background: transparent; color: var(--white); border: 1px solid var(--line); }
.submit, .search-submit { padding: 12px 20px; background: var(--white); color: var(--ink); border: 0; cursor: pointer; }

.empty-state { padding: 110px 0 140px; }
.empty-state p { max-width: 620px; color: var(--muted); }
.search-form { display: flex; max-width: 600px; margin-top: 30px; gap: 8px; }

.home-content { padding-bottom: 0; }
.home-content .entry-content { padding-bottom: 76px; }
.taxonomy-explorer { background: var(--ink-deep); }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.category-tile { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 16px; min-height: 126px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s ease; }
.category-tile:hover { background: rgba(255,255,255,.045); color: var(--white); }
.category-tile__mark { display: flex; align-items: center; width: 28px; }
.category-tile__mark i { display: block; width: 13px; height: 28px; }
.category-tile__mark i:first-child { background: var(--white); border-radius: 18px 0 0 18px; }
.category-tile__mark i:last-child { height: 24px; background: var(--blue); border-radius: 0 18px 18px 0; transform: translateY(3px); }
.category-tile__body { display: flex; min-width: 0; flex-direction: column; }
.category-tile__body strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.category-tile__body small { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.category-tile__arrow { color: var(--blue); font-size: 20px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }
.tag-cloud a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; text-decoration: none; }
.tag-cloud a:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }
.closing-cta { padding: 76px 0; background: var(--paper); color: var(--ink); }
.closing-cta__inner { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.closing-cta h2 { max-width: 760px; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; letter-spacing: -.04em; }
.closing-cta .button { background: var(--ink); border-color: var(--ink); color: var(--white); white-space: nowrap; }
.closing-cta .button:hover { background: var(--blue); border-color: var(--blue); color: var(--ink); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding: 38px 0; color: rgba(255,255,255,.48); font-size: 12px; }
.footer-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 850px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; z-index: 10; top: 88px; left: 24px; right: 24px; display: none; padding: 20px; background: var(--ink-deep); border: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (max-width: 620px) {
  .wrap, .entry-content, .entry-footer, .comments-area, .post-navigation, .featured-image { width: min(100% - 32px, var(--content)); }
  .site-header { padding-top: 23px; }
  .hero { padding-top: 60px; }
  .hero h1, .page-title, .article-title { font-size: clamp(40px, 12vw, 58px); }
  .posts-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 360px; }
  .section-head, .footer-inner { align-items: flex-start; flex-direction: column; }
  .closing-cta__inner { align-items: flex-start; flex-direction: column; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .search-form { flex-direction: column; }
}

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