/* BZB Works — portfólio
   Tokens conforme GUIA_ESTILO.md (§19–§29). Base mobile-first. */

:root {
  --bg: #F3F2EE;
  --surface: #FAFAF7;
  --ink: #171916;
  --muted: #5E625C;
  --line: #D4D5CF;
  --accent: #286044;
  --accent-dark: #183A2A;
  --accent-soft: #DCE8DF;

  --font: "Manrope", Inter, "Helvetica Neue", Arial, system-ui, sans-serif;

  --r-sm: 4px;
  --r: 8px;
  --r-img: 10px;

  --gutter: 20px;
  --section: 72px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; overflow-wrap: break-word; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 12px 16px; border-radius: var(--r); text-decoration: none;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Tipografia ---------- */

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.025em;
  max-width: 17ch;
}

h2 {
  font-size: clamp(30px, 7.6vw, 36px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 22ch;
}

h3 {
  font-size: clamp(21px, 5.6vw, 24px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 58ch;
}

.section-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
  margin-top: 16px;
}

/* ---------- Botões e links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button:active { transform: none; }

.button-small { min-height: 44px; padding: 0 20px; font-size: 15px; }

.button-light { background: var(--bg); color: var(--accent-dark); }
.button-light:hover { background: #fff; }
.button-light:focus-visible { outline-color: var(--bg); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color .2s var(--ease);
}
.link-arrow:hover { color: var(--accent-dark); text-decoration: underline; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 40px; width: auto; }

.nav-desktop { display: none; }

.nav-mobile { position: relative; }
.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  padding-inline: 8px;
  margin-right: -8px;
  font-weight: 600;
  font-size: 15px;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { color: var(--accent); }
.nav-mobile nav {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(280px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(23, 25, 22, .08);
}
.nav-mobile nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 500;
}
.nav-mobile nav a:hover { background: var(--bg); }
.nav-mobile .nav-mobile-cta {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  color: var(--accent);
  font-weight: 600;
  gap: 6px;
}

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

.hero {
  display: grid;
  gap: 48px;
  padding-top: 32px;
  padding-bottom: var(--section);
}

.hero-copy .lead { margin-top: 24px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
}

.hero-media {
  position: relative;
  padding-bottom: 20%;
}

.shot img {
  width: 100%;
  border-radius: var(--r-img);
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.shot-primary { width: 92%; }
.shot-primary figcaption { max-width: 36%; }
.shot-primary img { object-position: 30% 0; }

.shot-secondary {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
}
.shot-secondary img {
  object-position: 20% 0;
  box-shadow: 0 0 0 6px var(--bg);
}

/* ---------- Seções ---------- */

.section { padding-block: var(--section); border-top: 1px solid var(--line); }
.section-head { margin-bottom: 48px; }

/* Situações */
.situation-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.situation-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 500;
}

/* Serviços */
.service-groups { display: grid; gap: 48px; }

.service-index {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.service-index span { color: var(--accent); font-variant-numeric: tabular-nums; }

.service h3 { margin-bottom: 12px; }
.service > p:not(.service-index):not(.service-items) { color: var(--muted); }
.service-items {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

/* Projetos */
.case { display: grid; gap: 24px; margin-bottom: 64px; }

.case-media {
  display: block;
  overflow: hidden;
  border-radius: var(--r-img);
  border: 1px solid var(--line);
  background: var(--surface);
}
.case-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 25% 0;
  transition: transform .3s var(--ease);
}
.case-media:hover img { transform: scale(1.015); }

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.case-body h3 { margin-bottom: 12px; }
.case-body p:not(.case-meta) { color: var(--muted); max-width: 52ch; }
.case-body .link-arrow { margin-top: 8px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: .04em;
}
.tag-progress { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

.case-pair {
  display: grid;
  gap: 32px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.case-text h3 { margin-bottom: 8px; }
.case-text p:not(.case-meta) { color: var(--muted); max-width: 52ch; }

.more-projects { border-top: 1px solid var(--line); padding-top: 40px; }
.more-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.project-list li {
  display: grid;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pl-name {
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  justify-self: start;
}
a.pl-name {
  color: var(--ink);
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block: -10px;
}
a.pl-name:hover { color: var(--accent); text-decoration: underline; }
a.pl-name span[aria-hidden] { color: var(--accent); font-size: 15px; }
.pl-type { font-size: 13px; line-height: 1.45; color: var(--accent); font-weight: 600; }
.pl-desc { color: var(--muted); }

.inline-cta {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  font-size: 18px;
  font-weight: 500;
}

/* Processo */
.steps { display: grid; border-top: 1px solid var(--line); }
.steps li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); max-width: 44ch; }

/* Sobre */
.about-grid { display: grid; gap: 32px; }
.about-copy { display: grid; gap: 16px; max-width: 64ch; font-size: 18px; line-height: 1.55; }
.about-note { font-size: 14px; line-height: 1.45; color: var(--muted); padding-top: 16px; border-top: 1px solid var(--line); }

/* Contato */
.contact {
  background: var(--accent-dark);
  color: var(--bg);
  padding-block: 88px;
}
.contact h2 { max-width: 20ch; }
.contact p { margin-top: 24px; font-size: 18px; line-height: 1.55; color: #C9D3CC; max-width: 56ch; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 40px;
}
.contact-number { font-size: 15px; color: #C9D3CC; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { padding-block: 40px calc(40px + env(safe-area-inset-bottom)); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-logo { height: 48px; width: auto; }
.footer-inner p { font-size: 14px; line-height: 1.45; color: var(--muted); flex: 1 1 260px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* CTA fixo (mobile) */
.mobile-cta {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
.mobile-cta .button { width: 100%; box-shadow: 0 8px 24px rgba(23, 25, 22, .18); }
.mobile-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
body.has-mobile-cta .site-footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }

/* ---------- Movimento ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-media .shot {
    animation: rise .45s var(--ease) both;
    animation-delay: .18s;
  }
  .hero-media .shot-secondary { animation-delay: .28s; }

  .reveal { transition: opacity .45s var(--ease), transform .45s var(--ease); }
  .reveal.reveal-pending { opacity: 0; transform: translateY(16px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .button:hover, .case-media:hover img { transform: none; }
}

/* ---------- Breakpoints ---------- */

@media (max-width: 359px) {
  :root { --gutter: 16px; }
}

@media (min-width: 640px) {
  .situation-list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .situation-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .case-media img { aspect-ratio: 16 / 10; }
  .case-pair { grid-template-columns: 1fr 1fr; gap: 48px; }
  .project-list li { grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) 2fr; align-items: baseline; gap: 16px; }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 96px; --header-h: 72px; }

  .brand img { height: 44px; }
  .nav-mobile { display: none; }
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 500;
  }
  .nav-desktop a:not(.button) {
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    text-underline-offset: 6px;
  }
  .nav-desktop a:not(.button):hover { color: var(--accent); text-decoration: underline; }

  .mobile-cta { display: none; }
  body.has-mobile-cta .site-footer { padding-bottom: 40px; }

  .service-groups { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .steps li { border-bottom: 0; border-top: 1px solid var(--ink); padding: 20px 24px 0 0; }

  .about-grid { grid-template-columns: 5fr 7fr; gap: 48px; }
  .contact { padding-block: 128px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 48px; --section: 112px; }

  h1 { font-size: clamp(52px, 4.5vw, 68px); line-height: 1.02; max-width: none; }
  h2 { font-size: clamp(42px, 3.8vw, 52px); }
  h3 { font-size: 26px; }
  .lead, .section-sub { font-size: 20px; }

  .hero {
    grid-template-columns: 58fr 42fr;
    align-items: center;
    gap: 56px;
    padding-top: 64px;
    min-height: min(calc(88vh - var(--header-h)), 760px);
  }
  .hero-media { padding-bottom: 28%; }
  .shot-primary { width: 100%; }
  .shot-secondary { width: 70%; right: -8%; }

  .section-head {
    display: grid;
    grid-template-columns: 5fr 7fr;
    column-gap: 48px;
    align-items: end;
    margin-bottom: 64px;
  }
  .section-head .eyebrow { grid-column: 1 / -1; }
  .section-head .section-sub { margin-top: 0; }
  .section-head h2:last-child { grid-column: 1 / -1; }

  .case { grid-template-columns: repeat(12, 1fr); gap: 32px; align-items: end; margin-bottom: 96px; }
  .case-feature .case-media { grid-column: 1 / -1; }
  .case-feature .case-body { grid-column: 1 / 8; }
  .case-feature .case-media img { aspect-ratio: 16 / 8; object-position: 50% 0; }

  .case-alt .case-media { grid-column: 5 / -1; grid-row: 1; }
  .case-alt .case-body { grid-column: 1 / 5; grid-row: 1; align-self: center; }
  .case-alt .case-media img { aspect-ratio: 16 / 10; object-position: 50% 0; }

  .case-pair { padding-block: 48px; }
  .project-list li { grid-template-columns: 1.2fr 1.2fr 2fr; }
}

@media (min-width: 1280px) {
  :root { --gutter: 64px; --section: 128px; }
  .hero { gap: 80px; }
}
