/* =========================================================
   GLOBAL.CSS — 1 arquivo (Mobile First)
   Estética parecida com o layout de referência
   ========================================================= */

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; }

[hidden]{ display: none !important; }


/* Tokens */
:root{
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(17,24,39,.10);

  --shadow: 0 10px 24px rgba(17,24,39,.06);
  --shadow-strong: 0 16px 34px rgba(17,24,39,.10);

  --radius: 14px;
  --container: 1120px;
  --header-h: 64px;

  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-6: 32px;

  --fz-sm: .95rem;
  --fz-md: 1rem;
  --fz-xl: 2.2rem;

  --lh-tight: 1.12;
  --lh: 1.6;
}

/* Base */
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: var(--lh);
}

/* Fundo estilo polígonos (você cria o arquivo) */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/assets/img/bg-polygons.svg") center top / cover no-repeat;
  opacity: .92;
  pointer-events: none;
}


.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 1024px){
  .container{
    padding-inline: 24px;
  }
}

.section > .container{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 20px;
}

/* no desktop dá mais respiro */
@media (min-width: 1024px){
  .section > .container{
    padding: 34px 28px;
  }
}

.main{ padding-top: calc(var(--header-h) + 12px); }

/* Acessibilidade */
.skip-link{
  position: absolute;
  left: -999px;
  top: 12px;
  background: #111827;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 9999;
}
.skip-link:focus{ left: 12px; }

/* Tipografia */
.eyebrow{ margin: 0 0 var(--space-2); font-size: var(--fz-sm); color: var(--muted); }

.h1{
  margin: 0 0 var(--space-2);
  font-size: var(--fz-xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.h1-accent{
  display: block;
  margin-top: 6px;
  font-weight: 600;
  opacity: .86;
}

.h2{
  margin: 0 0 var(--space-3);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.h3{
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
}

.lead{
  margin: 0 0 var(--space-4);
  max-width: 62ch;
  font-size: 1.05rem;
  opacity: .92;
}

.muted{ color: var(--muted); margin: 0; }
p{ margin: 0 0 var(--space-3); }

/* Seções */
.section{ padding: 56px 0; }
.hero{ padding: 74px 0 56px; }

.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Header */
.header{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: black;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-row{
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bg);
  min-width: 0;
}
.brand-logo{ height: 28px; }
.brand-text{ font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.menu-btn{
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  height: 42px;
  width: 46px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.menu-icon{ width: 18px; height: 12px; position: relative; }
.menu-icon::before,
.menu-icon::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background:#111827;
  border-radius: 2px;
}
.menu-icon::before{ top: 1px; }
.menu-icon::after{ bottom: 1px; }

/* Menu mobile */
.nav-panel{
  position: fixed;                 /* <- era absolute */
  top: var(--header-h);
  right: 0;
  left: 0;                       /* ocupa altura toda */
  width: 100%;

  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-strong);

  transform: translateY(-110%);     /* começa fora da tela */
  transition: max-height .35s ease, transform .25s ease; /* slide rápido e suave */
  z-index: 1500;
  max-height: 0;
  overflow: hidden;
}

.nav-panel.is-open{
  max-height: 320px;
  transform: translateY(0);
}

.nav-panel .container{
  max-width: none;
  padding: 16px;
}

.nav-inner{
  display: grid;
  gap: 10px;
  padding: 14px 0 16px;
}

.nav-link{
  display: block;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: .95rem;
}

.nav-cta{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

/* Menu desktop (print) */
.nav-desktop{
  display: none;
  align-items: center;
  gap: 22px;
}
.nav-link-desktop{
  text-decoration: none;
  color: var(--bg);
  font-weight: 700;
  font-size: .95rem;
  opacity: .86;
}
.nav-link-desktop:hover{
  opacity: 1;
  text-decoration: underline;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.btn.primary:hover{
  background: #fff;
  color: #111827;
}

.btn.ghost{ background: transparent; }

.btn.small{
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: .92rem;
}

.btn.small:hover, .btn.small.ghost:hover, .btn.ghost:hover{
  text-decoration: underline;
}

/* Action rows */
.hero-actions,
.cta-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero .h1{
  font-size: 1.9rem;          /* menor no mobile */
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 100%;
}

/* subtítulo */
.hero .h1-accent{
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;         /* claramente menor */
  line-height: 1.25;
  font-weight: 600;
  opacity: .85;
}

@media (min-width: 768px){
  .hero .h1{
    font-size: 2.4rem;
  }

  .hero .h1-accent{
    font-size: 1.6rem;
  }
}

@media (min-width: 1024px){
  .hero .h1{
    font-size: 2.8rem;
  }

  .hero .h1-accent{
    font-size: 1.8rem;
  }
}


/* Chips / tags */
.chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.chip{
  font-size: .85rem;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.tag{
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--muted);
}

/* Cards */
.cards{ display: grid; gap: 18px; }

.card,
.project,
.post{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

/* Projects */

.project{
  display: flex;
  flex-direction: column;
}

.project-list{ 
  display: grid;
  gap: 18px;
  margin-top: 12px;

  grid-template-columns: repeat(auto-fit, minmax(320px, 460px));
  justify-content: center;}

.project-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge{
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
}

.project-cover{
  display: block;           /* agora é <a>, garante block */
  aspect-ratio: 16 / 10;    /* ou 16 / 9 se preferir */
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 12px;
}

.project-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;

  filter: grayscale(100%);
  transition: filter .25s ease, transform .25s ease;
}

.project:hover .project-cover img{
  filter: grayscale(0%);
  transform: scale(1.03);
}

.project-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ===== CASE (página do projeto) ===== */
.case-grid{
  display: grid;
  gap: 18px;
}

.case-meta{
  display: grid;
  gap: 10px;
}

.kv{
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
}

.kv .label{ font-size: .85rem; color: var(--muted); }
.kv .value{ font-weight: 800; }

.case-cover{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.case-cover img{
  width: 100%;
  display: block;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}

/* no desktop, conteúdo + sidebar */
@media (min-width: 1024px){
  .case-grid{
    grid-template-columns: 1.6fr .9fr;
    align-items: start;
  }
}

/* Blog / Posts */
.posts{
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

/* Tablet: 2 colunas */
@media (min-width: 640px){
  .posts{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 3 colunas (igual projetos) */
@media (min-width: 1020px){
  .posts{
    grid-template-columns: repeat(3, 1fr);
  }
}


/* Post cards com capa (estilo projetos) */
.post{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.post-title{ text-decoration: none; }
.post-title:hover{ text-decoration: underline; }

.post-meta{ font-size: .92rem; margin: 8px 0 0; }

/* Capa do post (mesmo comportamento do cover de projetos) */
.post-cover{
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 12px;
}

.post-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* P&B por padrão */
  filter: grayscale(85%) contrast(1.05);
  transition: filter .25s ease, transform .25s ease;
}

@media (hover: hover) and (pointer: fine){
  .post:hover .post-cover img{
    filter: grayscale(0%);
    transform: scale(1.03);
  }
}

.post-tags {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: #6b7280;
}

.post-tags span {
  margin-right: 8px;
  font-weight: 600;
}

.post-tags a {
  margin-right: 10px;
  text-decoration: none;
  color: #2563eb;
}

.post-tags a:hover {
  text-decoration: underline;
}


/* Social */
/* MOBILE (default) */
.social-grid{
  display: grid;
  gap: 10px;
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 colunas no mobile */
}

.social{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 46px;
  padding: 0 12px;

  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.12);
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(6px);

  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* TABLET+ (mais colunas conforme couber) */
@media (min-width: 640px){
  .social-grid{
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* DESKTOP (hover só faz sentido aqui) */
@media (hover: hover) and (pointer: fine){
  .social{
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .social:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
    background: rgba(255,255,255,.95);
  }
}


/* About */

.about{
  display: grid;
  gap: 18px;
  align-items: start;
}
.about-photo{  
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  margin-inline: auto;
}
.about-copy{ max-width: 68ch; }
.about-list{
  margin: 10px 0 14px;
  padding-left: 18px;
  color: var(--muted);
}
.about-list li{ margin: 6px 0; }

/* Footer */
.footer{
  padding: 28px 0 40px;
  color: var(--muted);
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.link{ text-decoration: none; font-weight: 800; }
.link:hover{ text-decoration: underline; }

/* Hover (desktop) */
@media (min-width: 1024px){
  .card:hover,
  .project:hover,
  .post:hover{
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
    transition: .18s ease;
  }
}

/* Responsive */
@media (min-width: 900px){
  .nav-desktop{ display: flex; }
  .menu-btn{ display: none; }
  .nav-panel{ display: none; }

  .about{
    grid-template-columns: 320px 1fr;
    align-items: center;
    gap: 28px;
  }
}

@media (min-width: 1024px){
  :root{ --fz-xl: 2.8rem; }

  .cards{ grid-template-columns: repeat(3, 1fr); }
  .project-list{ grid-template-columns: repeat(3, 1fr); }
  .posts{ grid-template-columns: repeat(3, 1fr); }
  .social-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================
   FORMS (Contato) — Mobile First + integra com o design atual
   Cole no FINAL do global.css
   ========================================================= */

.form{
  display: grid;
  gap: 12px;
}

.field{
  display: grid;
  gap: 6px;
}

.field > span{
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
}

.field input,
.field textarea{
  width: 100%;
  border: 1px solid rgba(17,24,39,.14);
  background: #fff;
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.field textarea{
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus{
  border-color: rgba(17,24,39,.38);
  box-shadow: 0 0 0 4px rgba(17,24,39,.10);
}

.form-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.form-status{
  min-height: 22px;
  font-size: .95rem;
  color: var(--muted);
}

.form-status.ok{ color: #16a34a; }
.form-status.err{ color: #dc2626; }

/* Sucesso (mesma estética do site) */
.success{
  display: grid;
  gap: 10px;
  text-align: left;
}

.success-title{
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-title wa-icon{
  font-size: 1.2rem;
}

@media (min-width: 768px){
  .form{
    gap: 14px;
  }
}

.field-error{
  display: none;
  font-size: .88rem;
  color: #dc2626;
  margin-top: 2px;
}

.field.is-invalid .field-error{
  display: block;
}

.field.is-invalid input,
.field.is-invalid textarea{
  border-color: rgba(220,38,38,.55);
  box-shadow: 0 0 0 4px rgba(220,38,38,.10);
}

