/*
Theme Name: Inpyx Blog
Theme URI: https://inpyx.com/
Author: Inpyx
Author URI: https://inpyx.com/
Description: Tema clássico moderno para o blog da Inpyx. Estilo agência, cards, identidade verde, foco em performance, SEO e leitura. Comunicação que vende.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: inpyx-blog
Tags: blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* ==========================================================================
   DESIGN TOKENS — Identidade Inpyx
   ========================================================================== */
:root {
  /* Verde Inpyx — troque estes hex se tiver o valor oficial da marca */
  --inpyx-green: #1DB954;        /* verde vivo principal */
  --inpyx-green-600: #17a344;    /* hover / estados */
  --inpyx-green-700: #0f7c33;    /* texto sobre claro */
  --inpyx-green-900: #0a4d20;    /* verde profundo */
  --inpyx-green-050: #eafaf0;    /* fundo suave */

  --ink: #0e1512;                /* texto principal quase-preto esverdeado */
  --ink-600: #48544e;            /* texto secundário */
  --ink-400: #7c877f;            /* legendas / meta */
  --line: #e6ebe7;               /* bordas / divisores */
  --surface: #ffffff;            /* fundo cards */
  --bg: #f7f9f7;                 /* fundo página */

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 21, 18, .04), 0 2px 8px rgba(14, 21, 18, .04);
  --shadow-md: 0 4px 12px rgba(14, 21, 18, .06), 0 12px 32px rgba(14, 21, 18, .08);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1160px;
  --gap: clamp(1rem, 2.5vw, 2rem);
}

/* ==========================================================================
   RESET LEVE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--inpyx-green-700); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--inpyx-green-600); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin: 0 0 .5em; }
p { margin: 0 0 1.2em; }

/* Acessibilidade: foco visível */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--inpyx-green);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--inpyx-green); color: #fff; padding: .75rem 1.25rem;
  z-index: 999; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.site-branding { display: flex; align-items: center; gap: .65rem; }
.site-logo img { max-height: 40px; width: auto; }
.site-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -.03em; margin: 0;
}
.site-title a { color: var(--ink); }
.site-title .dot { color: var(--inpyx-green); }
.site-description { font-size: .8rem; color: var(--ink-400); margin: 0; }

/* NAV */
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .35rem; align-items: center; }
.main-nav a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  color: var(--ink-600); font-weight: 500; font-size: .95rem;
}
.main-nav a:hover { background: var(--inpyx-green-050); color: var(--inpyx-green-700); }
.main-nav .current-menu-item > a { background: var(--inpyx-green); color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* HERO */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}
.hero__eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--inpyx-green-700); background: var(--inpyx-green-050);
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem); max-width: 16ch; margin-bottom: .4em;
}
.hero__title em { color: var(--inpyx-green); font-style: normal; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-600); max-width: 52ch; }

/* MAIN GRID */
.site-main { padding-bottom: 4rem; }
.content-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

/* CARDS — grade de posts estilo agência */
.posts-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap);
}
.post-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--inpyx-green-050); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__cat {
  position: absolute; top: .8rem; left: .8rem;
  background: var(--inpyx-green); color: #fff; font-size: .72rem; font-weight: 600;
  font-family: var(--font-display); letter-spacing: .03em;
  padding: .3rem .7rem; border-radius: 999px;
}
.post-card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card__title { font-size: 1.2rem; margin-bottom: .5rem; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--inpyx-green-700); }
.post-card__excerpt { color: var(--ink-600); font-size: .96rem; margin-bottom: 1rem; flex: 1; }
.post-card__meta {
  display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--ink-400);
  padding-top: .85rem; border-top: 1px solid var(--line);
}
.post-card__more { margin-left: auto; font-weight: 600; color: var(--inpyx-green-700); font-family: var(--font-display); }

/* SIDEBAR */
.sidebar .widget {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.4rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.sidebar .widget-title {
  font-family: var(--font-display); font-size: 1rem; letter-spacing: -.01em;
  padding-bottom: .7rem; margin-bottom: .9rem; border-bottom: 2px solid var(--inpyx-green);
  display: inline-block;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink-600); }
.sidebar a:hover { color: var(--inpyx-green-700); }

/* SINGLE POST */
.single-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.single-hero__cat {
  font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .05em;
  color: var(--inpyx-green-700); text-transform: uppercase;
}
.single-hero__title { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 22ch; margin: .5rem 0 .8rem; }
.single-hero__meta { color: var(--ink-400); font-size: .92rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.single-featured { border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0 2.5rem; box-shadow: var(--shadow-md); }
.entry-content { max-width: 720px; margin-inline: auto; font-size: 1.12rem; }
.entry-content h2 { font-size: 1.7rem; margin-top: 2rem; }
.entry-content h3 { font-size: 1.35rem; margin-top: 1.6rem; }
.entry-content img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.entry-content blockquote {
  margin: 1.8rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--inpyx-green);
  background: var(--inpyx-green-050); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--ink);
}
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }

/* PAGINATION */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .8rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; color: var(--ink-600);
}
.pagination .page-numbers.current { background: var(--inpyx-green); color: #fff; border-color: var(--inpyx-green); }
.pagination a.page-numbers:hover { border-color: var(--inpyx-green); color: var(--inpyx-green-700); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.4rem; border-radius: 999px; cursor: pointer; border: 0;
  background: var(--inpyx-green); color: #fff; transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--inpyx-green-600); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--inpyx-green-700); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--inpyx-green-050); border-color: var(--inpyx-green); }

/* FOOTER */
.site-footer {
  background: var(--ink); color: #cdd6d0; padding: 3rem 0 2rem; margin-top: 2rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--inpyx-green); }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.site-footer__brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; }
.site-footer__brand .dot { color: var(--inpyx-green); }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer__bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem; color: var(--ink-400); text-align: center;
}

/* SEARCH FORM */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
  flex: 1; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem;
}
.search-form button {
  background: var(--inpyx-green); border: 0; color: #fff; padding: 0 1rem; border-radius: var(--radius-sm); cursor: pointer;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem;
  }
  .main-nav.is-open ul { flex-direction: column; align-items: stretch; }
  .nav-toggle { display: block; }
  .posts-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

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