/* ==========================================================================
   ZAVIT CONSULTING — Design System
   Ink #1C1B1A · Paper #F5F4F2 · Signal #19EC86
   Display: Fraunces · Body: Inter · Mono: JetBrains Mono
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500;1,9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  /* Core palette */
  --ink: #1c1b1a;
  --ink-2: #252321;
  --ink-3: #302d2b;
  --paper: #f5f4f2;
  --paper-2: #eae8e4;
  --paper-3: #ddd9d3;
  --signal: #19ec86;
  --signal-dim: #0ea968;
  --signal-deep: #0b7a4c;
  --signal-soft: rgba(25,236,134,.12);

  /* Text */
  --text-on-dark: #f5f4f2;
  --text-on-dark-soft: #a9a6a1;
  --text-on-dark-faint: #726f6a;
  --text-on-light: #1c1b1a;
  --text-on-light-soft: #62605c;
  --text-on-light-faint: #96938d;

  /* Lines */
  --line-on-dark: rgba(245,244,242,.14);
  --line-on-dark-strong: rgba(245,244,242,.24);
  --line-on-light: rgba(28,27,26,.13);
  --line-on-light-strong: rgba(28,27,26,.22);

  /* Type */
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Rhythm */
  --container: 1220px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 22px;

  --ease: cubic-bezier(.16,.8,.28,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{ margin:0; }
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
h1,h2,h3,h4,p,figure{ margin:0; }
input, textarea, select{ font-family:inherit; font-size:inherit; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

body{
  background: var(--paper);
  color: var(--text-on-light);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Utility type ---------- */
.eyebrow{
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--signal);
}
.eyebrow::before{
  content:"";
  width: 8px; height: 8px;
  background: var(--signal);
  clip-path: polygon(50% 0%, 100% 22%, 82% 100%, 18% 100%, 0% 22%);
  flex: none;
}
.eyebrow.on-light{ color: var(--signal-deep); }

h1, .h1{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.01em;
}
h2, .h2{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
h3, .h3{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}
.lede{
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-on-light-soft);
  max-width: 46ch;
}
.on-dark .lede{ color: var(--text-on-dark-soft); }

em.accent{
  font-style: italic;
  color: var(--signal);
}

/* pentagon shield mark — echoes the logo icon */
.mark{
  --s: 10px;
  width: var(--s); height: calc(var(--s) * 0.92);
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 24%, 82% 100%, 18% 100%, 0% 24%);
  display:inline-block;
  flex: none;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary{
  background: var(--signal);
  color: var(--ink);
}
.btn-primary:hover{ background: #3ff5a0; transform: translateY(-2px); }
.btn-ghost-dark{
  border-color: var(--line-on-dark-strong);
  color: var(--text-on-dark);
}
.btn-ghost-dark:hover{ border-color: var(--signal); color: var(--signal); transform: translateY(-2px); }
.btn-ghost-light{
  border-color: var(--line-on-light-strong);
  color: var(--text-on-light);
}
.btn-ghost-light:hover{ border-color: var(--signal-deep); color: var(--signal-deep); transform: translateY(-2px); }
.btn svg{ width: 15px; height: 15px; transition: transform .3s var(--ease); }
.btn:hover svg{ transform: translateX(3px); }

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23,22,21,.97);
  border-bottom: 1px solid var(--line-on-dark);
}
@supports (backdrop-filter: blur(1px)) and (not (translate: 0)){
  /* Safari-only fallback isn't needed; blur removed globally to avoid creating a
     containing block for position:fixed descendants (breaks the mobile nav panel). */
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-logo img{ height: 30px; width: auto; }
.nav-links{
  display: flex;
  align-items: center;
  gap: 38px;
}
.nav-links a{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-on-dark-soft);
  position: relative;
  padding: 4px 0;
  transition: color .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active{ color: var(--text-on-dark); }
.nav-links a.active::after{
  content:"";
  position: absolute;
  left:0; right:0; bottom: -6px;
  height: 2px;
  background: var(--signal);
}
.nav-cta{ display:flex; align-items:center; gap:22px; }
.nav-toggle{
  display:none;
  background:none; border:none; color: var(--text-on-dark);
  width: 30px; height: 22px; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; position:absolute; left:0; right:0; height:2px; background: currentColor; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span{ top: 10px; }
.nav-toggle span::before{ top: -8px; }
.nav-toggle span::after{ top: 8px; }
.nav-toggle.open span{ background: transparent; }
.nav-toggle.open span::before{ transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span::after{ transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px){
  .nav-links{
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px var(--gutter);
    gap: 26px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav-links.open{ opacity:1; transform: translateY(0); pointer-events: auto; }
  .nav-links a{ font-size: 22px; font-family: var(--f-display); }
  .nav-cta .btn-ghost-dark{ display:none; }
  .nav-toggle{ display:block; }
}

/* ---------- Sections ---------- */
section{ position: relative; }
.on-dark{ background: var(--ink); color: var(--text-on-dark); }
.on-paper2{ background: var(--paper-2); }
.pad-xl{ padding-top: clamp(72px, 11vw, 148px); padding-bottom: clamp(72px, 11vw, 148px); }
.pad-l{ padding-top: clamp(56px, 8vw, 108px); padding-bottom: clamp(56px, 8vw, 108px); }

.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head h2{ margin-top: 14px; max-width: 16ch; }
.section-head .lede{ margin-bottom: 6px; }

/* ---------- Hero ---------- */
.hero{
  background: var(--ink);
  color: var(--text-on-dark);
  padding-top: clamp(64px, 9vw, 108px);
  overflow: hidden;
  position: relative;
}
.hero::before{
  content:"";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 360px at 82% 8%, rgba(25,236,134,.14), transparent 70%);
  pointer-events: none;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
.hero-copy h1{ margin-top: 22px; }
.hero-copy .lede{ margin-top: 22px; }
.hero-actions{
  display:flex; align-items:center; gap: 18px; margin-top: 40px; flex-wrap: wrap;
}
.hero-foot{
  display:flex; gap: 34px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-on-dark); flex-wrap: wrap;
}
.hero-foot-item{ font-family: var(--f-mono); font-size: 12px; color: var(--text-on-dark-soft); letter-spacing: .04em;}
.hero-foot-item b{ display:block; color: var(--text-on-dark); font-family: var(--f-body); font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }

/* Network diagram (signature element) */
.topo{ width: 100%; height: auto; overflow: visible; }
.topo .node-dot{ fill: var(--ink); stroke: var(--signal); stroke-width: 1.6; }
.topo .node-core{ fill: var(--signal); }
.topo .node-label{ font-family: var(--f-mono); font-size: 10.5px; fill: var(--text-on-dark-soft); letter-spacing: .06em; }
.topo .link{ fill:none; stroke: var(--line-on-dark-strong); stroke-width: 1.4; }
.topo .link-pulse{
  fill:none; stroke: var(--signal); stroke-width: 1.4;
  stroke-dasharray: 6 220;
  animation: dash 5.5s linear infinite;
  opacity: .95;
}
.topo .link-pulse.d2{ animation-delay: 1.1s; }
.topo .link-pulse.d3{ animation-delay: 2.3s; }
.topo .link-pulse.d4{ animation-delay: 3.4s; }
@keyframes dash{
  from{ stroke-dashoffset: 0; }
  to{ stroke-dashoffset: -400; }
}
.topo .pulse-ring{
  fill:none; stroke: var(--signal); stroke-width: 1; opacity: 0;
  transform-origin: center;
  animation: ring 3.6s var(--ease) infinite;
}
.topo .pulse-ring.d2{ animation-delay: 1.2s; }
.topo .pulse-ring.d3{ animation-delay: 2.4s; }
@keyframes ring{
  0%{ opacity:.55; transform: scale(.6); }
  100%{ opacity:0; transform: scale(2.6); }
}

@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-diagram{ order: -1; opacity: .9; }
}

/* ---------- Pillars grid ---------- */
.pillars{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-on-light);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.pillar{
  background: var(--paper);
  padding: 36px 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background .3s var(--ease);
}
.pillar:hover{ background: var(--paper-2); }
.pillar-num{
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--signal-deep);
  display: flex; align-items: center; gap: 8px;
}
.pillar h3{ margin-top: 2px; }
.pillar p{ color: var(--text-on-light-soft); font-size: 14.8px; line-height: 1.55; flex: 1; }
.pillar-link{
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text-on-light);
  display: inline-flex; align-items: center; gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line-on-light);
}
.pillar-link svg{ width: 12px; height: 12px; transition: transform .3s var(--ease); }
.pillar:hover .pillar-link svg{ transform: translateX(3px); }

@media (max-width: 980px){
  .pillars{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px){
  .pillars{ grid-template-columns: 1fr; }
}

/* ---------- Approach split ---------- */
.approach{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 64px;
}
.approach-list{ display:flex; flex-direction:column; }
.approach-item{
  display: flex;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line-on-dark);
}
.approach-item:last-child{ border-bottom: 1px solid var(--line-on-dark); }
.approach-item .mark{ margin-top: 7px; color: var(--signal); }
.approach-item h4{
  font-family: var(--f-body); font-weight: 600; font-size: 16.5px; margin-bottom: 6px;
}
.approach-item p{ color: var(--text-on-dark-soft); font-size: 14.5px; line-height: 1.6; }

@media (max-width: 900px){
  .approach{ grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- CTA band ---------- */
.cta-band{
  background: var(--signal);
  color: var(--ink);
  border-radius: var(--radius-l);
  padding: clamp(40px, 6vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-band h2{ max-width: 15ch; }
.cta-band .btn-primary{ background: var(--ink); color: var(--text-on-dark); }
.cta-band .btn-primary:hover{ background: var(--ink-3); }
.cta-wrap{ margin: 0 var(--gutter); }
.cta-wrap .container{ padding:0; max-width: var(--container); }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--ink);
  color: var(--text-on-dark-soft);
  padding-top: clamp(56px, 7vw, 90px);
}
.footer-top{
  display: grid;
  grid-template-columns: 1.3fr repeat(3, .8fr);
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand img{ height: 28px; margin-bottom: 18px; }
.footer-brand p{ max-width: 32ch; font-size: 14px; line-height: 1.6; }
.footer-col h5{
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-on-dark); margin-bottom: 18px; font-weight: 500;
}
.footer-col a, .footer-col li{ font-size: 14px; line-height: 2.1; }
.footer-col a{ transition: color .25s var(--ease); }
.footer-col a:hover{ color: var(--signal); }
.footer-bottom{
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 0 34px; font-size: 12.5px; flex-wrap: wrap; gap: 12px;
  font-family: var(--f-mono);
  color: var(--text-on-dark-faint);
}

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

/* ---------- Page hero (inner pages) ---------- */
.page-hero{
  background: var(--ink);
  color: var(--text-on-dark);
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(48px, 6vw, 76px);
}
.page-hero h1{ margin-top: 18px; max-width: 18ch; }
.page-hero .lede{ margin-top: 20px; }
.breadcrumb{
  font-family: var(--f-mono); font-size: 12px; color: var(--text-on-dark-faint); letter-spacing: .04em;
}
.breadcrumb a:hover{ color: var(--signal); }

/* ---------- Service detail rows (servicos.html) ---------- */
.service-row{
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 56px;
  padding: clamp(56px,7vw,96px) 0;
  border-top: 1px solid var(--line-on-light);
}
.service-row:last-child{ border-bottom: 1px solid var(--line-on-light); }
.service-head{ position: sticky; top: 110px; align-self: start; }
.service-head .pillar-num{ margin-bottom: 16px; }
.service-head h2{ max-width: 12ch; }
.service-body p.lede{ max-width: 60ch; margin-bottom: 34px; color: var(--text-on-light-soft); }
.service-feats{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}
.service-feat{
  display:flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line-on-light);
}
.service-feat .mark{ margin-top: 6px; color: var(--signal-deep); }
.service-feat h4{ font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.service-feat p{ font-size: 13.6px; color: var(--text-on-light-soft); line-height: 1.55; }

@media (max-width: 900px){
  .service-row{ grid-template-columns: 1fr; gap: 24px; }
  .service-head{ position: static; }
  .service-feats{ grid-template-columns: 1fr; }
}

/* ---------- About page ---------- */
.timeline{
  display:flex; flex-direction: column;
}
.timeline-item{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line-on-light);
}
.timeline-item:last-child{ border-bottom: 1px solid var(--line-on-light); }
.timeline-year{ font-family: var(--f-mono); font-size: 14px; color: var(--signal-deep); font-weight: 500; }
.timeline-item h4{ font-size: 17px; font-weight: 600; margin-bottom: 6px; font-family: var(--f-body);}
.timeline-item p{ color: var(--text-on-light-soft); font-size: 14.5px; max-width: 60ch; line-height: 1.6; }

.values-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.value-card{
  background: var(--paper);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-m);
  padding: 30px 26px;
}
.on-dark .value-card{ background: var(--ink-2); }
.value-card .mark{ color: var(--signal); margin-bottom: 18px; }
.value-card h4{ font-family: var(--f-body); font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.value-card p{ font-size: 14px; color: var(--text-on-dark-soft); line-height: 1.6; }

@media (max-width: 860px){
  .values-grid{ grid-template-columns: 1fr; }
  .timeline-item{ grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Contact page ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
}
.contact-cards{ display: flex; flex-direction: column; gap: 14px; }
.contact-card{
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-m);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.contact-card:hover{ border-color: var(--signal); transform: translateY(-2px); }
.contact-card .ic{
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--signal-soft);
  display:flex; align-items:center; justify-content:center;
  flex: none;
}
.contact-card .ic svg{ width: 18px; height: 18px; color: var(--signal); }
.contact-card h4{ font-family: var(--f-body); font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.contact-card p{ font-size: 14px; color: var(--text-on-dark-soft); }
.contact-card .tag{
  font-family: var(--f-mono); font-size: 10.5px; color: var(--signal);
  background: var(--signal-soft); padding: 2px 8px; border-radius: 999px; margin-left: 8px;
}

.form-card{
  background: var(--paper);
  border-radius: var(--radius-l);
  padding: clamp(28px, 4vw, 48px);
  color: var(--text-on-light);
}
.field{ margin-bottom: 20px; }
.field label{
  display:block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-on-light-soft); margin-bottom: 8px;
}
.field input, .field select, .field textarea{
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-on-light-strong);
  border-radius: var(--radius-s);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text-on-light);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: none; border-color: var(--signal-deep); background: #fff;
}
.field-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field textarea{ resize: vertical; min-height: 120px; }
.form-note{ font-size: 12.5px; color: var(--text-on-light-faint); margin-top: 14px; line-height: 1.6; }

@media (max-width: 900px){
  .contact-grid{ grid-template-columns: 1fr; gap: 40px; }
  .field-row{ grid-template-columns: 1fr; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* reveal on scroll */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity: 1; transform: translateY(0); }
