/* opaulinho.com — design system
   Mesma identidade visual do Mapa-Brasil: fundo branco, tinta quase-preta,
   bordas grossas, sombra "off-set" (sem blur), cores fortes e chapadas. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6f4;
  --ink: #111111;
  --text: #111111;
  --text-muted: #4a4f4a;
  --text-faint: #7a807a;

  --green: #046a38;
  --green-soft: #e3f2e9;
  --red: #d7263d;
  --blue: #3fa9f5;
  --yellow: #f5b700;

  --shadow-off: 5px 5px 0 var(--ink);
  --shadow-off-sm: 3px 3px 0 var(--ink);
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Baloo 2", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  border-bottom: 3px solid var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.brand .name {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav a svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.nav a.current {
  color: var(--green);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--surface-2);
}

.lang-switch a {
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--text-faint);
}

.lang-switch a.active {
  background: var(--ink);
  color: #fff;
}

/* ---------- Icon buttons / ghost buttons ---------- */

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 11px 20px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-off-sm);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn-ghost:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-ghost.green { background: var(--green); color: #fff; }
.btn-ghost.blue { background: var(--blue); color: #fff; }
.btn-ghost.red { background: var(--red); color: #fff; }
.btn-ghost.yellow { background: var(--yellow); color: var(--ink); }
.btn-ghost.outline-green { color: var(--green); }
.btn-ghost.outline-blue { color: var(--blue); }
.btn-ghost.outline-red { color: var(--red); }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 40px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 0 28px;
}

.hero .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin: 0 0 10px;
}

/* ---------- Blog cards ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  padding: 8px 0 72px;
}

.post-grid .post-card:first-child {
  grid-column: span 2;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-off);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}

.post-card:hover, .post-card:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}

.post-card .thumb {
  aspect-ratio: 16 / 9;
  border-bottom: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card .thumb svg {
  width: 44px;
  height: 44px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.6;
}

.post-card .body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.post-card .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.post-card h3 {
  font-size: 1.25rem;
}

.post-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.post-card .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.post-card .lang-note {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-style: italic;
}

/* ---------- Window card (contato, artigo) ---------- */

.window {
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 32px;
  margin: 40px 0 72px;
}

.window .window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--surface-2);
}

.window .window-dots {
  display: flex;
  gap: 6px;
}

.window .window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.window .window-dots span:nth-child(1) { background: var(--red); }
.window .window-dots span:nth-child(2) { background: var(--yellow); }
.window .window-dots span:nth-child(3) { background: var(--green); }

.window .window-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-left: 4px;
}

.contact-intro {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.contact-info .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}

.contact-info .item .icon {
  color: var(--green);
}

/* ---------- Form ---------- */

.form-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  border: 2px solid var(--ink);
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}

.form-field .field-error {
  font-size: 0.78rem;
  color: var(--red);
  min-height: 1em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 20px;
  padding: 14px;
  border: 2px dashed var(--text-faint);
  border-radius: 10px;
  background: var(--surface-2);
}

.consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--green);
}

.consent label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-msg {
  font-size: 0.85rem;
  margin-top: 14px;
}

.form-msg.error { color: var(--red); }
.form-msg.success { color: var(--green); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Article page ---------- */

.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.article .eyebrow { margin-bottom: 6px; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 10px; }
.article .meta { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--text-faint); margin-bottom: 28px; }
.article p { font-size: 1.05rem; color: var(--text); }
.article .lead { font-size: 1.15rem; color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 3px solid var(--ink);
  padding: 32px 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 720px) {
  .post-grid .post-card:first-child { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .site-header .wrap { height: auto; padding-top: 14px; padding-bottom: 14px; }
}
