/*
Theme Name: Escrevendo Comunicação
Theme URI: https://escrevendocomunicacao.site/
Author: Escrevendo Comunicação
Author URI: https://escrevendocomunicacao.site/
Description: Tema institucional de página única convertido do projeto React/Vite da Escrevendo Comunicação para WordPress.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: escrevendo-comunicacao
*/

:root {
  --ec-navy: #1B2A4A;
  --ec-gold: #C9A227;
  --ec-beige: #F4EFE6;
  --ec-beige-deep: #EFE8DB;
  --ec-dark: #12192B;
  --ec-gray: #5B5F66;
  --ec-white: #FFFFFF;
  --ec-border: rgba(27, 42, 74, 0.08);
  --ec-shadow: 0 8px 28px rgba(18, 25, 43, 0.08);
  --ec-radius: 12px;
  --ec-max: 1152px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--ec-beige);
  color: var(--ec-gray);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--ec-navy); text-decoration: none; }
a:hover { color: var(--ec-gold); }
button, input, textarea, select { font: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--ec-navy);
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}
p { margin-top: 0; }

.ec-container { width: min(calc(100% - 48px), var(--ec-max)); margin-inline: auto; }
.ec-section { padding: 80px 0; }
.ec-eyebrow {
  display: block;
  color: var(--ec-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.ec-section-heading { max-width: 672px; }
.ec-section h2 { margin: 12px 0 0; font-size: clamp(2rem, 4vw, 2.5rem); }

.ec-skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 99999;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ec-white);
  color: var(--ec-navy);
  font-weight: 700;
}
.ec-skip-link:focus { top: 12px; }

.ec-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--ec-border);
  background: rgba(244, 239, 230, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.admin-bar .ec-site-header { top: 32px; }
.ec-header-inner { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 24px; padding-block: 10px; }
.ec-brand { display: inline-flex; align-items: center; color: inherit; }
.ec-logo-lockup { display: inline-flex; align-items: center; gap: 12px; }
.ec-logo-words { display: block; font-family: "DM Serif Display", Georgia, serif; font-size: 1.35rem; line-height: 1; letter-spacing: -.02em; }
.ec-logo-words span { display: block; color: var(--ec-navy); }
.ec-logo-words span:last-child { margin-top: 3px; color: var(--ec-gold); }
.custom-logo { display: block; width: auto; max-height: 48px; }
.ec-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--ec-navy);
  color: var(--ec-white) !important;
  font-size: 14px;
  font-weight: 700;
  transition: opacity .2s ease, transform .2s ease;
}
.ec-header-cta:hover { opacity: .9; transform: translateY(-1px); }

.ec-hero { position: relative; overflow: hidden; }
.ec-hero-inner {
  display: flex;
  min-height: calc(100dvh - 64px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 96px;
  text-align: center;
}
.ec-hero-seal { filter: drop-shadow(0 4px 6px rgba(18, 25, 43, .12)); }
.ec-hero h1 { margin: 30px 0 0; font-size: clamp(2.75rem, 7vw, 4.5rem); line-height: 1.05; }
.ec-hero h1 span { position: relative; display: inline-block; color: var(--ec-gold); white-space: nowrap; }
.ec-hero h1 svg { position: absolute; left: 0; bottom: -10px; width: 100%; height: 10px; overflow: visible; }
.ec-hero h1 path { fill: none; stroke: var(--ec-gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 120; animation: ec-ink 1.2s ease-out .4s both; }
.ec-hero p { max-width: 576px; margin: 24px auto 0; font-size: 1.125rem; line-height: 1.7; }
.ec-text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 38px; font-weight: 700; }
.ec-text-link svg { transition: transform .2s ease; }
.ec-text-link:hover svg { transform: translateY(4px); }

.ec-two-columns { display: grid; gap: 48px; }
.ec-copy { font-size: 1.05rem; }
.ec-copy p { margin-bottom: 16px; }
.ec-copy strong { color: var(--ec-navy); }
.ec-stats { display: grid; gap: 24px; margin-top: 64px; }
.ec-stat { height: 100%; padding: 32px; border: 1px solid var(--ec-border); border-radius: var(--ec-radius); background: var(--ec-white); text-align: center; }
.ec-stat strong { display: block; color: var(--ec-navy); font-family: "DM Serif Display", Georgia, serif; font-size: 3rem; font-weight: 400; line-height: 1; }
.ec-stat span { display: block; margin-top: 10px; font-size: 14px; line-height: 1.35; }

.ec-portals-section { border-block: 1px solid var(--ec-border); background: var(--ec-beige-deep); }
.ec-portal-grid { display: grid; max-width: 960px; gap: 24px; margin: 48px auto 0; }
.ec-portal-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--ec-radius);
  background: var(--ec-white);
  box-shadow: 0 2px 8px rgba(18, 25, 43, .05);
  color: var(--ec-gray);
  transition: transform .3s ease, box-shadow .3s ease;
}
.ec-portal-card:hover { transform: translateY(-4px); box-shadow: var(--ec-shadow); color: var(--ec-gray); }
.ec-portal-logo { display: flex; height: 96px; align-items: center; justify-content: center; padding: 12px; border: 1px solid rgba(27, 42, 74, .1); border-radius: 6px; background: var(--ec-white); }
.ec-portal-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ec-portal-content { display: flex; flex: 1; flex-direction: column; margin-top: 20px; }
.ec-portal-content small { color: var(--ec-gold); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ec-portal-content strong { margin-top: 4px; color: var(--ec-navy); font-family: "DM Serif Display", Georgia, serif; font-size: 1.5rem; font-weight: 400; line-height: 1.2; }
.ec-portal-content > span { margin-top: 8px; font-size: 14px; line-height: 1.65; }
.ec-portal-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--ec-navy); font-size: 14px; font-weight: 700; }
.ec-portal-link svg { transition: transform .2s ease; }
.ec-portal-card:hover .ec-portal-link svg { transform: translateX(4px); }

.ec-method-section { background: var(--ec-dark); }
.ec-method-section h2, .ec-pillar h3 { color: var(--ec-beige); }
.ec-pillars { display: grid; gap: 40px; margin-top: 56px; }
.ec-pillar { height: 100%; padding-top: 24px; border-top: 1px solid rgba(201, 162, 39, .33); }
.ec-pillar > svg { color: var(--ec-gold); }
.ec-pillar h3 { margin: 16px 0 0; font-size: 1.25rem; }
.ec-pillar p { margin: 8px 0 0; color: rgba(244, 239, 230, .7); font-size: 14px; line-height: 1.7; }

.ec-contact-grid { display: grid; align-items: center; gap: 40px; }
.ec-contact-grid p { max-width: 448px; margin-top: 16px; font-size: 1.05rem; }
.ec-contact-card { padding: 32px; border: 1px solid var(--ec-border); border-radius: var(--ec-radius); background: var(--ec-white); }
.ec-contact-card a { display: inline-flex; align-items: center; gap: 12px; overflow-wrap: anywhere; font-weight: 700; }
.ec-contact-card svg { flex: 0 0 auto; color: var(--ec-gold); }

.ec-site-footer { background: var(--ec-navy); color: rgba(244, 239, 230, .7); }
.ec-footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-block: 48px; text-align: center; }
.ec-footer-inner p { margin: 0; font-size: 14px; }
.ec-footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ec-beige); font-family: "DM Serif Display", Georgia, serif; font-size: 1.15rem; }
.ec-footer-brand strong { color: var(--ec-gold); font-weight: 400; }

.js .ec-reveal { opacity: 0; }
.js .ec-reveal.ec-in { animation: ec-fade-up .7s cubic-bezier(.16,1,.3,1) var(--delay, 0ms) forwards; }
@keyframes ec-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ec-ink { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }

.ec-content-shell { min-height: 70vh; padding: 88px 0; }
.ec-content-narrow { max-width: 760px; }
.ec-entry h1, .ec-page-header h1, .ec-404 h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.ec-entry-content { margin-top: 32px; color: #222; }
.ec-entry-content > * { max-width: 100%; }
.ec-entry-content h2 { margin-top: 2em; font-size: 2rem; }
.ec-entry-content h3 { margin-top: 1.7em; font-size: 1.5rem; }
.ec-entry-content a { color: var(--ec-navy); text-decoration: underline; text-underline-offset: 3px; }
.ec-entry-content blockquote { margin: 2rem 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--ec-gold); background: rgba(255,255,255,.55); }
.ec-featured-image { margin: 32px 0; }
.ec-featured-image img { display: block; border-radius: var(--ec-radius); }
.ec-post-list { display: grid; gap: 24px; margin-top: 40px; }
.ec-post-card { padding: 28px; border-radius: var(--ec-radius); background: var(--ec-white); }
.ec-post-card h2 { margin-bottom: 6px; font-size: 2rem; }
.ec-post-card p:last-child { margin-bottom: 0; }
.ec-post-meta { color: var(--ec-gray); font-size: 14px; }
.ec-404 { text-align: center; }
.ec-404 .ec-header-cta { margin-top: 18px; }

@media (min-width: 640px) {
  .ec-stats { grid-template-columns: repeat(3, 1fr); }
  .ec-portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 768px) {
  .ec-section { padding: 112px 0; }
  .ec-two-columns, .ec-contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
}

@media (min-width: 1024px) {
  .ec-portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ec-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
  .admin-bar .ec-site-header { top: 46px; }
}

@media (max-width: 639px) {
  .ec-container { width: min(calc(100% - 32px), var(--ec-max)); }
  .ec-header-cta { display: none; }
  .ec-logo-words { font-size: 1.12rem; }
  .ec-hero-inner { min-height: calc(100dvh - 64px); padding-block: 72px; }
  .ec-hero h1 { font-size: 2.7rem; }
  .ec-section { padding: 72px 0; }
  .ec-contact-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .ec-reveal { opacity: 1; }
}
