/* ==========================================================================
   Poly Studio — Neo-Brutalist Design System
   Brand tokens + component classes used across every page template.
   ========================================================================== */

:root {
  /* --- Brand tokens ------------------------------------------------------ */
  --yellow: #FFDE00;
  --purple: #5E2BFF;
  --purple-light: #D9CCFF;
  --ink: #181726;
  --gray: #676879;

  /* Surfaces */
  --white: #FFFFFF;
  --off-white: #F4F3F7; /* off-white section background */

  /* Typography */
  --font-headings: "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Lora", Georgia, serif;

  /* Neo-brutalist structural variables */
  --border: 3px solid var(--ink);
  --border-sm: 2px solid var(--ink);
  --shadow: 6px 6px 0 0 var(--ink);
  --shadow-sm: 4px 4px 0 0 var(--ink);
  --shadow-hover: 2px 2px 0 0 var(--ink);

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;

  --maxw: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--purple);
}

/* --- Typography ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-sm);
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 var(--sp-sm); }

/* --- Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.section {
  padding: var(--sp-xl) 0;
}

.section--off-white {
  background: var(--off-white);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: var(--ink);
  padding: var(--sp-sm);
  border: var(--border);
  z-index: 2000;
}
.skip-link:focus {
  left: var(--sp-sm);
}

/* --- Full-width colored bands ------------------------------------------- */
.band {
  padding: var(--sp-xl) 0;
}
.band--purple {
  background: var(--purple);
  color: var(--white);
}
.band--purple h1,
.band--purple h2,
.band--purple h3 {
  color: var(--white);
  text-shadow: 3px 3px 0 var(--ink);
}
.band--yellow {
  background: var(--yellow);
  color: var(--ink);
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover,
.btn:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-hover);
  outline: none;
}
.btn:active {
  transform: translate(6px, 6px);
  box-shadow: none;
}
.btn--purple { background: var(--purple); color: var(--white); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.9rem; box-shadow: var(--shadow-sm); }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: var(--sp-lg);
}
.card--flush { padding: 0; overflow: hidden; }

/* --- Forms --------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--sp-md);
}
.form-label {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.form-input,
.form-textarea,
.form-select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem;
  border: var(--border);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}
.check-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-headings);
  font-weight: 600;
  cursor: pointer;
}

/* --- Header -------------------------------------------------------------- */
.site-header {
  background: var(--off-white);
  border-bottom: 2px solid rgba(24, 23, 38, 0.08);
  position: sticky;
  top: 0;
  z-index: 500;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-sm);
  padding-bottom: var(--sp-sm);
}
.site-logo { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--yellow); }
.site-logo__img { height: 44px; width: auto; display: block; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--sp-md);
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.03em;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--purple);
  border-bottom-color: var(--purple);
  outline: none;
}
.nav-toggle {
  display: none;
  background: var(--yellow);
  border: var(--border-sm);
  color: var(--ink);
  font-family: var(--font-headings);
  font-weight: 800;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-header .container {
    flex-wrap: wrap;
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    gap: var(--sp-sm);
    width: 100%;
    padding: var(--sp-sm) 0;
  }
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--off-white);
  color: var(--ink);
  border-top: 2px solid rgba(24, 23, 38, 0.08);
  padding: var(--sp-xl) 0 var(--sp-lg);
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--purple); outline: none; }
.footer-logo { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink); }
.footer-logo__img { height: 64px; width: auto; display: block; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--sp-lg);
  align-items: start;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-heading {
  font-family: var(--font-headings);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}
.footer-social {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}
.footer-social a { font-weight: 700; }
.footer-bottom {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(24, 23, 38, 0.15);
  color: var(--gray);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.post-hero__img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}
/* --- Contact section ----------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--sp-lg);
}
.contact-info h3 { margin-bottom: 0.25rem; }
.contact-info p { margin-bottom: var(--sp-md); }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-status {
  margin-top: var(--sp-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-headings);
  font-weight: 700;
  border: var(--border-sm);
}
.form-status--ok { background: #e4ffe4; }
.form-status--error { background: #ffe0e0; }
.form-status--pending { background: var(--purple-light); }

/* --- Page header band ---------------------------------------------------- */
.band--header { padding: var(--sp-lg) 0; }
.band--header h1 { margin-bottom: var(--sp-sm); }

.band--light {
  background: var(--purple-light);
  color: var(--ink);
}

.container--readable { max-width: 780px; }

/* --- Rendered Markdown prose -------------------------------------------- */
.prose { font-size: 1.08rem; }
.prose h1 { margin-top: var(--sp-lg); }
.prose h2 { margin-top: var(--sp-lg); }
.prose h3,
.prose h4 { margin-top: var(--sp-md); }
.prose img {
  border: var(--border);
  box-shadow: var(--shadow);
  margin: var(--sp-md) auto;
}
.prose em { color: var(--gray); }
.prose ul,
.prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose hr {
  border: none;
  border-top: var(--border-sm);
  margin: var(--sp-lg) 0;
}
.prose a { font-weight: 600; }
.prose blockquote {
  margin: var(--sp-md) 0;
  padding: var(--sp-sm) var(--sp-md);
  border-left: 6px solid var(--purple);
  background: var(--off-white);
}

/* --- Responsive video embed --------------------------------------------- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: var(--sp-md) 0;
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--ink);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Card grids ---------------------------------------------------------- */
.card-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
.post-grid--related {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.post-grid--home {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1000px) {
  .post-grid--home { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .post-grid--home { grid-template-columns: 1fr; }
}

/* --- Project + post cards ------------------------------------------------ */
.project-card,
.post-card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.project-card__media,
.post-card__media {
  display: block;
  border-bottom: var(--border);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-card__media img,
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__media--placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--purple), var(--ink));
}
.project-card__body,
.post-card__body {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.project-card__title,
.post-card__title {
  font-size: 1.2rem;
  margin: 0;
}
.project-card__title a,
.post-card__title a {
  color: var(--ink);
  text-decoration: none;
}
.project-card__title a:hover,
.post-card__title a:hover { color: var(--purple); }
.project-card__excerpt,
.post-card__excerpt {
  color: var(--gray);
  font-size: 0.98rem;
  margin: 0;
  flex: 1;
}
.project-card .btn,
.post-card .btn {
  align-self: flex-start;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
}

/* --- Title-card placeholder (posts have no thumbnails) ------------------ */
.title-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 190px;
  padding: var(--sp-md);
  position: relative;
  background: linear-gradient(135deg, var(--purple) 0%, #3a1a99 100%);
  color: var(--white);
}
.title-card__title {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.3;
  border: 4px solid var(--yellow);
  padding: 0.6rem 0.9rem;
  background: rgba(24, 23, 38, 0.15);
}
.title-card__logo {
  position: absolute;
  left: var(--sp-md);
  bottom: var(--sp-sm);
  width: 96px;
  height: auto;
}
.title-card--hero {
  min-height: 300px;
  border: var(--border);
  box-shadow: var(--shadow);
}
.title-card--hero .title-card__title { font-size: 1.8rem; }

/* --- Projetos filters ---------------------------------------------------- */
.projeto-filters {
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
  margin-bottom: var(--sp-md);
}
.filter-control { min-width: 260px; }
.filter-label {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.projeto-empty {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: var(--sp-md);
}

/* --- Projeto single ------------------------------------------------------ */
.projeto-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-bottom: var(--border);
}
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--sp-md);
}
.chip {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border: var(--border-sm);
}
.chip--categoria { background: var(--yellow); }
.chip--tech { background: var(--purple-light); }

/* --- Blog intro + pagination -------------------------------------------- */
.blog-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: var(--sp-md);
}
.blog-intro { width: 100%; }
.blog-search { width: 100%; max-width: 520px; }
.blog-search__input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  border: var(--border);
  background: var(--white);
}
.blog-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.blog-chip {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border: var(--border-sm);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.blog-chip:hover { background: var(--yellow); }
.blog-chip[aria-pressed="true"] { background: var(--purple); color: var(--white); }
.blog-chip:focus-visible,
.blog-search__input:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.blog-empty { margin-top: var(--sp-lg); font-weight: 700; }
.post-grid--blog { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) {
  .post-grid--blog { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .post-grid--blog { grid-template-columns: 1fr; }
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: var(--sp-xl);
}
.pagination__item {
  font-family: var(--font-headings);
  font-weight: 800;
  min-width: 2.6rem;
  text-align: center;
  padding: 0.5rem 0.6rem;
  border: var(--border-sm);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}
.pagination__item.is-current,
.pagination__item:hover {
  background: var(--purple);
  color: var(--white);
}

/* --- Post single --------------------------------------------------------- */
.post-hero { padding-top: var(--sp-lg); }
.post-title { margin-top: var(--sp-md); }
.post-byline {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: var(--sp-md);
}
.post-byline--sm { margin: 0; font-size: 0.8rem; }

/* --- Home ---------------------------------------------------------------- */
.hero__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-lg);
  align-items: center;
}
.hero__copy h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: var(--sp-xs);
}
.hero__subtitle {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: var(--sp-md);
}
.hero__copy p { max-width: 46ch; }
.hero__media { text-align: center; }
.hero__media img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 50%;
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--purple-light);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-lg);
  align-items: center;
}
/* Interactive Venn (ported from the original home widget) */
.venn-wrapper {
  --venn-yellow: var(--yellow);
  --venn-purple: #5E2BF1;
  --venn-green: #00D084;
  --venn-shadow-sm: 0px 2px 8px rgba(0, 0, 0, 0.04);
  --venn-shadow-md: 0px 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.venn-diagram-container {
  position: relative;
  width: 400px;
  height: 400px;
  flex-shrink: 0;
  margin: 0 auto;
  cursor: crosshair;
}
.venn-circle {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  mix-blend-mode: multiply;
  transition: all 0.4s ease;
  opacity: 0.3;
}
.venn-circle:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 4px;
}
.venn-circle.active {
  opacity: 0.85;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  z-index: 10;
}
.venn-c1 { top: 20px; left: 90px; background-color: var(--venn-yellow); }
.venn-c2 { bottom: 30px; left: 15px; background-color: var(--venn-purple); }
.venn-c3 { bottom: 30px; right: 15px; background-color: var(--venn-green); }
.venn-center-logo {
  position: absolute;
  top: 185px;
  left: 200px;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--white);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--venn-shadow-sm);
  overflow: hidden;
}
.venn-center-logo img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.venn-info-panel {
  flex: 1;
  min-width: 300px;
  background: var(--white);
  padding: 3rem;
  border: var(--border);
  box-shadow: var(--shadow);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.venn-title {
  font-size: 2rem;
  margin: 0 0 1rem;
  color: var(--ink);
  transition: color 0.3s;
}
.venn-text {
  font-size: 1.15rem;
  color: var(--gray);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 480px) {
  .venn-diagram-container {
    transform: scale(0.8);
    transform-origin: top center;
    margin-bottom: -80px;
  }
  .venn-info-panel { padding: 1.5rem; min-width: 0; }
}

.certs-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}

/* Clientes e projetos: looping logo marquee */
.marquee {
  overflow: hidden;
  margin-top: var(--sp-lg);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}
.marquee__track img {
  max-height: 54px;
  width: auto;
  flex-shrink: 0;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - (var(--sp-lg) / 2))); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}

.deliver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
.service-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}
.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
.work-item .btn { margin-top: var(--sp-sm); }
.card__icon {
  display: block;
  width: 40px;
  height: 40px;
  color: var(--purple);
  margin: 0 auto var(--sp-sm);
}

.service-block {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2.4fr;
  gap: var(--sp-lg);
  align-items: start;
}
.service-block__head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.service-block__head h2 { margin: 0; }
.service-block__icon {
  width: 64px;
  height: 64px;
  padding: 12px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
}
.service-block__body .btn { margin-top: var(--sp-sm); }
.service-block h4 {
  margin-top: var(--sp-md);
  color: var(--purple);
}
.service-block ul { padding-left: 1.3rem; }
@media (max-width: 860px) {
  .service-block { grid-template-columns: 1fr; gap: var(--sp-md); }
}

/* Author display rules (e.g. .project-card flex) otherwise beat [hidden]. */
[hidden] { display: none !important; }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: var(--border-sm);
}
.tag--categoria { background: var(--purple); color: var(--white); }
.tag--tecnologia { background: var(--white); color: var(--ink); }

/* --- Sobre --------------------------------------------------------------- */
.sobre-intro,
.sobre-work {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-lg);
  align-items: center;
}
.sobre-intro__media img,
.sobre-work__media img {
  border: var(--border);
  box-shadow: var(--shadow);
}
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  text-align: center;
}
.metrics-row--pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-lg) calc(var(--sp-xl) * 1.5);
  margin-bottom: var(--sp-lg);
}
.metrics-row--pair .metric { text-align: center; min-width: 180px; }
.section--white { background: var(--white); }
.section--purple-light { background: var(--purple-light); }
.hero__copy .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  max-width: none;
}
@media (min-width: 1000px) {
  .hero__copy .hero__actions { flex-wrap: nowrap; }
  .hero__copy .hero__actions .btn { white-space: nowrap; }
}
.home-projects { margin-top: var(--sp-md); }
@media (min-width: 1000px) {
  .home-projects { grid-template-columns: repeat(3, 1fr); }
}
.metric__number {
  display: block;
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--purple);
}
.metric__label {
  font-family: var(--font-headings);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.cert {
  margin: 0;
  text-align: center;
  max-width: 260px;
}
.cert img { max-height: 70px; width: auto; margin: 0 auto var(--sp-sm); }
.cert figcaption { font-size: 0.85rem; color: var(--gray); }

.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
}
.testimonial { margin: 0; }
.testimonial blockquote {
  margin: 0 0 var(--sp-md);
  font-style: italic;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-headings);
  font-weight: 800;
  flex-shrink: 0;
}

.testimonial__avatar--img { object-fit: cover; background: none; }
@media (max-width: 860px) {
  .hero__grid,
  .intro-grid,
  .sobre-intro,
  .sobre-work { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .metrics-row--pair { display: flex; }
}

/* --- Overflow safeguards -------------------------------------------------- */
html, body { max-width: 100%; overflow-x: hidden; }
.contact-grid > *, .footer-grid > *, .card { min-width: 0; }
.form-input, .form-textarea, .form-select { max-width: 100%; box-sizing: border-box; }
img, svg, video, iframe { max-width: 100%; }
.contact-info a, .prose, .footer-links a { overflow-wrap: anywhere; }
.prose table { display: block; overflow-x: auto; max-width: 100%; }

/* --- Trilhas ------------------------------------------------------------- */
.trilha-count {
  margin: 0;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.trilha-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  counter-reset: none;
}
.trilha-step {
  position: relative;
  min-width: 0;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.trilha-step__num {
  position: absolute;
  top: -0.75rem;
  left: -0.5rem;
  z-index: 1;
  min-width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 800;
  background: var(--yellow);
  color: var(--ink);
  border: var(--border-sm);
  box-shadow: var(--shadow);
}
.trilha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: var(--sp-xl);
}

/* --- EduBuilders routing, author box, newsletter ------------------------ */
.footer-today { max-width: 30ch; }
.footer-today a { text-decoration: underline; text-underline-offset: 2px; }
.edu-bridge h2 { font-size: 1.5rem; }
.edu-bridge p { max-width: 60ch; }
.edu-bridge a, .bridge-block a, .author-box a { text-decoration: underline; text-underline-offset: 2px; }
.author-box {
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
  margin-top: var(--sp-lg);
  padding: var(--sp-sm);
  border: var(--border);
  background: var(--off-white);
}
.author-box__img { width: 72px; height: 72px; flex: none; object-fit: cover; border: var(--border-sm); border-radius: 50%; }
.author-box__text p { margin: 0 0 0.35rem; }
.author-box__name { font-family: var(--font-headings); font-weight: 700; }
.author-box__edu { font-size: 0.95rem; color: var(--gray); }
.bridge-block { margin-top: var(--sp-md); padding: var(--sp-sm); border-left: 6px solid var(--purple); background: var(--purple-light); }
.bridge-block p { margin: 0; }
.newsletter { margin-top: var(--sp-lg); max-width: 100%; }
.newsletter iframe { display: block; max-width: 100%; }
.contato-email { font-family: var(--font-headings); font-weight: 700; }
.contato-page .contact-grid { margin-top: var(--sp-md); }
.service-block__links { margin: 0 0 var(--sp-sm); }
.projeto-bridge { margin-top: var(--sp-lg); padding: var(--sp-sm); border-left: 6px solid var(--purple); background: var(--purple-light); }
.projeto-bridge a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 720px) {
  .author-box { flex-direction: column; }
}
/* --- Entity, hub and home content lists ---------------------------------- */
.link-list { padding-left: 1.2rem; margin: 0 0 var(--sp-md); }
.link-list li { margin-bottom: var(--sp-xs); overflow-wrap: anywhere; }
.faq__item { margin-bottom: var(--sp-md); }
.hub-path { padding-left: 1.5rem; margin: var(--sp-md) 0; }
.hub-path li { margin-bottom: var(--sp-xs); overflow-wrap: anywhere; }
.hub-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--sp-lg);
}
.acts { padding-left: 1.5rem; }
.acts li { margin-bottom: var(--sp-sm); }
.band--purple a { color: inherit; text-decoration: underline; }
.band--purple .btn { text-decoration: none; color: var(--ink); }

.sobre-intro__copy .hero__subtitle { color: #fff; font-size: 1.2rem; font-weight: 600; }

/* --- Language switcher (header, mobile menu, footer) ---------------------- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
}
.lang-switcher__item {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  text-align: center;
  color: var(--gray);
  text-decoration: none;
  border-left: 1px solid rgba(24, 23, 38, 0.2);
}
.lang-switcher__item:first-child { border-left: 0; padding-left: 0; }
.lang-switcher__item:last-child { padding-right: 0; }
.site-nav a.lang-switcher__item,
.site-footer a.lang-switcher__item {
  padding: 0.35rem 0.55rem;
  border-bottom: 0;
  border-left: 1px solid rgba(24, 23, 38, 0.2);
  color: var(--gray);
}
.site-nav a.lang-switcher__item:first-child,
.site-footer a.lang-switcher__item:first-child { border-left: 0; padding-left: 0; }
.site-nav a.lang-switcher__item:last-child,
.site-footer a.lang-switcher__item:last-child { padding-right: 0; }
.lang-switcher a.lang-switcher__item:hover { color: var(--ink); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.lang-switcher a.lang-switcher__item:focus-visible { color: var(--ink); background: transparent; outline: 3px solid var(--purple); outline-offset: 2px; }
.lang-switcher__item[aria-current="true"],
.site-nav a.lang-switcher__item[aria-current="true"],
.site-footer a.lang-switcher__item[aria-current="true"] {
  color: var(--ink);
  font-weight: 700;
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.lang-switcher__item.is-unavailable { color: var(--gray); opacity: 0.7; cursor: default; }
@media (max-width: 860px) {
  .lang-switcher__item,
  .site-nav a.lang-switcher__item,
  .site-footer a.lang-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}
@media (min-width: 861px) and (max-width: 1100px) {
  .site-nav ul { gap: var(--sp-sm); }
}

/* --- Language suggestion popup (assets/js/lang-banner.js) ----------------- */
.lang-popup {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 400;
  width: min(320px, calc(100vw - 2rem));
  box-sizing: border-box;
  padding: 1rem 2.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
  animation: lang-popup-in 0.2s ease-out;
}
@keyframes lang-popup-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lang-popup { animation: none; } }
@media (max-width: 480px) {
  .lang-popup { right: 0.75rem; left: 0.75rem; bottom: 0.75rem; width: auto; }
}
.lang-popup__text { margin: 0; font-size: 0.95rem; line-height: 1.35; font-weight: 700; }
.lang-popup .btn { padding: 0.45rem 0.9rem; font-size: 0.85rem; box-shadow: var(--shadow-sm); }
.lang-popup__keep {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--gray);
  text-decoration: underline;
  cursor: pointer;
}
.lang-popup__keep:hover { color: var(--ink); }
.lang-popup__close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.lang-popup__keep:focus-visible,
.lang-popup__close:focus-visible,
.lang-popup .btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
/* --- Header language dropdown (partials/lang-menu.njk, assets/js/lang-menu.js) --- */
.lang-menu { position: relative; display: inline-block; }
.lang-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--gray);
  padding: 0.35rem 0.3rem;
  border: 0;
  background: transparent;
}
.lang-menu__trigger::-webkit-details-marker { display: none; }
.lang-menu__trigger::marker { content: ""; }
.lang-menu__trigger:hover,
.lang-menu[open] > .lang-menu__trigger { color: var(--ink); }
.lang-menu__trigger:focus-visible { color: var(--ink); outline: 3px solid var(--purple); outline-offset: 2px; }
.lang-menu__chev { transition: transform 0.15s; }
.lang-menu[open] .lang-menu__chev { transform: rotate(180deg); }
.lang-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 11rem;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
}
.lang-menu__panel li { margin: 0; }
.site-nav .lang-menu__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.85rem;
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
  border-bottom: 0;
  text-decoration: none;
}
.lang-menu__item-code { font-size: 0.75rem; letter-spacing: 0.06em; color: var(--gray); min-width: 1.6rem; }
.lang-menu__check { margin-left: auto; }
.site-nav a.lang-menu__item:hover,
.site-nav a.lang-menu__item:focus-visible { background: var(--off-white); color: var(--ink); border-bottom: 0; outline: none; }
.site-nav a.lang-menu__item:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; }
.site-nav a.lang-menu__item[aria-current="true"] { font-weight: 700; color: var(--ink); }
.lang-menu__item.is-unavailable { color: var(--gray); opacity: 0.7; }
@media (max-width: 860px) {
  .lang-menu { display: block; }
  .lang-menu__trigger { min-height: 44px; padding: 0 0.3rem; }
  .lang-menu__panel { position: static; box-shadow: none; margin-top: 4px; max-width: 100%; }
}
.site-nav ul.lang-menu__panel { display: block; gap: 0; width: auto; padding: 0; }
@media (max-width: 860px) { .site-nav ul.lang-menu__panel { width: 100%; padding: 0; } }
/* --- Newsletter consent placeholder (same box as the iframe: 480x150) ---------------- */
.newsletter__slot { width: 480px; max-width: 100%; height: 150px; box-sizing: border-box; }
.newsletter__placeholder {
  box-sizing: border-box;
  height: 100%;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  background: var(--off-white);
  border: var(--border-sm);
  overflow: hidden;
}
.newsletter__placeholder p { margin: 0; font-size: 0.9rem; line-height: 1.35; }
.newsletter__placeholder button[hidden] { display: none; }
/* --- Footer legal links ---------------------------------------------------------------- */
.footer-legal { display: inline-flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }
.footer-legal a, .footer-legal__btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.footer-legal a:hover, .footer-legal__btn:hover { color: var(--ink); }
.footer-legal a:focus-visible, .footer-legal__btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
/* --- Consent banner (assets/js/consent.js): bottom-LEFT; the language popup is bottom-RIGHT ---- */
.consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 410;
  width: min(380px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
  animation: lang-popup-in 0.2s ease-out;
}
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }
.consent__text { margin: 0 0 0.75rem; font-size: 0.9rem; line-height: 1.4; }
.consent__text a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; }
.consent__btn {
  flex: 1 1 0;
  min-width: 6.5rem;
  padding: 0.5rem 0.8rem;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--white);
  border: var(--border-sm);
  box-shadow: 3px 3px 0 0 var(--ink);
  cursor: pointer;
}
.consent__btn:hover { background: var(--yellow); }
.consent__link {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.consent__btn:focus-visible, .consent__link:focus-visible, .consent__close:focus-visible,
.consent__text a:focus-visible, .consent__opt input:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.consent__prefs { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(24, 23, 38, 0.2); }
.consent__prefs[hidden] { display: none; }
.consent__opt { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.6rem; font-size: 0.85rem; line-height: 1.35; cursor: pointer; }
.consent__opt input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: var(--purple); }
.consent__opt-text { display: flex; flex-direction: column; }
.consent__opt-desc { color: var(--gray); }
.consent__note { margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--gray); line-height: 1.35; }
.consent__save { width: 100%; flex: none; }
.consent__close {
  position: absolute; top: 0.3rem; right: 0.3rem; width: 1.75rem; height: 1.75rem;
  padding: 0; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer;
}
@media (max-width: 480px) {
  .consent { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; max-height: 75vh; padding: 0.75rem; }
  .consent__text { margin-bottom: 0.5rem; font-size: 0.82rem; line-height: 1.3; }
  .consent__btn { min-width: 0; padding: 0.45rem 0.4rem; font-size: 0.8rem; }
}
/* --- Privacy page ---------------------------------------------------------------------------- */
.privacy-page .container { max-width: 760px; }
.privacy-page h2 { margin-top: var(--sp-md); }
.privacy-page ul { padding-left: 1.2rem; }
.privacy-page li { margin-bottom: 0.5rem; }
.privacy-updated { color: var(--gray); font-size: 0.9rem; }
