/* 2P2M Consulting — cores retiradas do logótipo */
:root {
  --green-900: #2b372d;
  --green-800: #3a4a3c;
  --green-600: #5e7560;
  --green-400: #8c9c83;
  --green-100: #e4e9df;
  --sand-500: #b79e7e;
  --sand-300: #e8d4b5;
  --sand-100: #f7ecd9;
  --paper: #faf7f0;
  --white: #ffffff;
  --ink: #1f2721;
  --muted: #5b655d;
  --line: #e3ddcf;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(43, 55, 45, .06), 0 12px 32px -12px rgba(43, 55, 45, .18);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-600); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--green-900); letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--sand-500); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand-500);
  margin-bottom: .75em;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 2px solid var(--green-800);
  background: var(--green-800);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.btn:hover { background: var(--green-600); border-color: var(--green-600); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green-800); }
.btn-ghost:hover { background: var(--green-800); color: var(--white); border-color: var(--green-800); }
.btn-small { padding: .55em 1.1em; font-size: .9rem; }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 44px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.site-nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px; background: var(--sand-500); transition: right .25s; }
.site-nav a:not(.btn):hover::after { right: 0; }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--green-600); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: min(380px, 80%); animation: float 7s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(43,55,45,.18)); }
.hero-blob {
  position: absolute; inset: 6% 4%;
  background: radial-gradient(circle at 30% 30%, var(--sand-100), transparent 60%),
              radial-gradient(circle at 70% 70%, var(--green-100), transparent 60%);
  border-radius: 42% 58% 55% 45% / 45% 40% 60% 55%;
  animation: morph 14s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes morph { 50% { border-radius: 58% 42% 45% 55% / 55% 60% 40% 45%; } }

/* Secções */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-dark { background: var(--green-800); color: var(--sand-100); }
.section-dark h2 { color: var(--white); }
.section-dark .eyebrow { color: var(--sand-300); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); font-size: 1.05rem; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters:empty { display: none; }
.filter {
  font: 500 .9rem var(--font-body);
  padding: .5em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: all .2s;
}
.filter:hover { border-color: var(--green-400); }
.filter[aria-pressed="true"] { background: var(--green-800); border-color: var(--green-800); color: var(--white); }

/* Portefólio */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); grid-auto-flow: dense; gap: 24px; }
.project {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(43,55,45,.06), 0 24px 48px -16px rgba(43,55,45,.28); }
.project.featured { grid-column: span 2; }
.project-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--green-100); border-bottom: 1px solid var(--line); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s; }
.project:hover .project-media img { transform: scale(1.03); }
.project-media .browser-bar { position: absolute; inset: 0 0 auto; height: 26px; background: rgba(255,255,255,.9); display: flex; align-items: center; gap: 6px; padding-left: 12px; z-index: 1; }
.project-media .browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.project-media.has-img { padding-top: 26px; }
.placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green-600), var(--green-800) 55%, var(--green-900));
  color: var(--sand-100);
  font: 700 clamp(2.5rem, 6vw, 4rem) var(--font-head);
  letter-spacing: -.02em;
}
.placeholder::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(232,212,181,.25) 40%, rgba(232,212,181,.25) 60%, transparent 60%); }
.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sand-500); margin-bottom: .5em; }
.project h3 { margin-bottom: .35em; }
.project p { color: var(--muted); font-size: .97rem; }
.tags { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .78rem; font-weight: 500; padding: .25em .7em; border-radius: 6px; background: var(--green-100); color: var(--green-800); }
.project-link { margin-top: auto; font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--green-800); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.project-link span { transition: transform .2s; }
.project-link:hover span { transform: translate(3px, -3px); }
.notice { color: var(--muted); }

/* Serviços */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { padding: 28px 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); transition: border-color .2s, transform .3s; }
.service:hover { border-color: var(--green-400); transform: translateY(-3px); }
.service-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-800); margin-bottom: 20px; }
.service-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--sand-300); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service p { color: var(--muted); font-size: .95rem; }
.service ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.service li { padding: 6px 0 6px 22px; border-top: 1px dashed var(--line); position: relative; }
.service li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 10px; height: 2px; background: var(--sand-500); }

/* Processo */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { padding-top: 22px; border-top: 2px solid var(--green-800); }
.step-n { font: 700 .9rem var(--font-head); color: var(--sand-500); display: block; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Sobre */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.about p { font-size: 1.08rem; color: var(--sand-100); opacity: .92; }
.about strong { color: var(--white); }

/* Contacto */
.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, var(--sand-100), var(--sand-300));
  border: 1px solid var(--sand-300);
}
.contact-card h2 { margin-bottom: .3em; }
.contact-card p:last-child { margin: 0; color: var(--green-800); }

/* Rodapé */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.footer-inner img { width: 36px; height: 36px; }
.footer-copy { flex: 1; }
.footer-copy p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--green-800); text-decoration: underline; }
.site-footer a.complaints { color: var(--green-800); font-weight: 600; border: 1px solid var(--line); border-radius: 8px; padding: .3em .75em; background: var(--white); }
.footer-copy .footer-legal { margin-top: 2px; font-size: .8rem; }

/* Páginas legais */
.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal .updated { color: var(--muted); font-size: .95rem; }
.legal .toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; display: grid; gap: 6px; }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 1em; }
.legal dt { font-weight: 600; color: var(--green-900); }
.legal dd { margin: 0; }

/* Animações de entrada */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* Responsivo */
@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { height: 2px; background: var(--green-900); border-radius: 2px; transition: transform .25s, opacity .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 16px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: min(220px, 60%); }
  .about { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand img { height: 36px; }
  .services, .steps { grid-template-columns: 1fr; }
  .project.featured { grid-column: auto; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .legal dl { grid-template-columns: 1fr; gap: 0; }
  .legal dd { margin-bottom: 10px; }
  .contact-actions, .contact-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Secção atual no menu */
.site-nav a[aria-current]:not(.btn)::after { right: 0; }
