/* ==========================================================================
   Contrapeso — casa de maquinas
   Grafite e latao para a maquina; papel de ficha tecnica para o documento.
   ========================================================================== */

:root {
  --graphite: #0e1317;
  --steel:    #161d23;
  --steel-2:  #1c252c;
  --rail:     #27323b;
  --brass:    #c79a46;
  --brass-hi: #e3c286;
  --paper:    #e6e8e3;
  --paper-2:  #dcdfd8;
  --ink:      #111619;
  --signal:   #f1f3f2;
  --mute:     #8c979e;
  --mute-ink: #5c666c;
  --alert:    #cf5b3c;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1140px;
  --gut: clamp(20px, 4vw, 40px);
  --band-pad: clamp(72px, 10vw, 140px);
  --rail-x: clamp(20px, 4vw, 52px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--signal);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; }

::selection { background: var(--brass); color: var(--graphite); }

:focus-visible {
  outline: 2px solid var(--brass-hi);
  outline-offset: 3px;
}

/* --- tipografia -------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-stretch: 105%; letter-spacing: -0.005em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: #c7cfd4;
  max-width: 54ch;
}

.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.tag::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

/* --- estrutura --------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.band { padding-block: var(--band-pad); position: relative; }
.band-tight { padding-block: clamp(48px, 6vw, 84px); }

.band-paper {
  background: var(--paper);
  color: var(--ink);
}
.band-paper .tag { color: #8a6a1f; }

/* Guia do elevador: linha continua na lateral, com o contrapeso descendo
   conforme a pagina sobe. E o unico enfeite fixo do layout. */
.guide {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--rail-x);
  width: 12px;
  pointer-events: none;
  z-index: 5;
}
.guide::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--rail) 8%, var(--rail) 92%, transparent);
}
.guide-weight {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 46px;
  border: 1px solid var(--brass);
  background: var(--graphite);
  will-change: transform;
}
.guide-weight::after {
  content: "";
  position: absolute;
  inset: 3px 2px;
  border-top: 1px solid rgba(199, 154, 70, 0.5);
  border-bottom: 1px solid rgba(199, 154, 70, 0.5);
}
@media (max-width: 1023px) { .guide { display: none; } }

/* --- cabecalho --------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 19, 23, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rail);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 115%;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand-mark { display: block; width: 17px; height: 26px; }
.top-nav { display: flex; align-items: center; gap: 30px; }
.top-nav a {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  transition: color 0.18s ease;
}
.top-nav a:hover { color: var(--signal); }
@media (max-width: 860px) { .top-nav .hide-sm { display: none; } }

/* --- botoes ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brass);
  background: var(--brass);
  color: var(--graphite);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--brass-hi); border-color: var(--brass-hi); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent;
  color: var(--brass);
}
.btn-ghost:hover { background: rgba(199, 154, 70, 0.12); color: var(--brass-hi); }
.btn-sm { padding: 10px 18px; font-size: 0.72rem; }
.btn-block { width: 100%; justify-content: center; padding-block: 18px; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* --- hero -------------------------------------------------------------- */

.hero { padding-top: clamp(38px, 4.8vh, 96px); padding-bottom: clamp(42px, 5.2vh, 100px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  /* escala pela altura da tela, nao so pela largura: mantem o CTA acima da dobra */
  font-size: clamp(2.4rem, min(6.2vw, 7.3vh), 4.6rem);
  margin-bottom: clamp(18px, 2.3vh, 26px);
}
.hero .lede { font-size: clamp(1.02rem, min(1.8vw, 2.3vh), 1.3rem); }
.hero .tag { margin-bottom: clamp(14px, 2vh, 22px); }
.hero h1 em {
  font-style: normal;
  color: var(--brass);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.hero-note {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rail);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--mute);
  letter-spacing: 0.02em;
}
.hero-note b { color: var(--signal); font-weight: 500; }
@media (max-width: 900px) {
  /* No celular a promessa vem primeiro; o desenho entra depois do botao. */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 330px; margin: 8px auto 0; }
}

/* --- desenho do poco (assinatura) -------------------------------------- */

.shaft { width: 100%; height: auto; display: block; }
.shaft-line   { stroke: var(--rail); stroke-width: 1; fill: none; }
.shaft-cable  { stroke: var(--brass); stroke-width: 1.5; fill: none; }
.shaft-body   { fill: var(--steel); stroke: var(--brass); stroke-width: 1.5; }
.shaft-fill   { fill: var(--steel-2); stroke: var(--rail); stroke-width: 1; }
.shaft-dim    { stroke: var(--mute); stroke-width: 0.75; fill: none; }
.shaft-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  fill: var(--mute);
}
.shaft-label-key { fill: var(--brass); }
/* Sequencia de carregamento: o cabo se desenha, o contrapeso desce,
   a cabine sobe, as cotas aparecem. */
.shaft-cable {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.is-ready .shaft-cable { animation: draw 1.5s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
.shaft-cw   { transform: translateY(-52px); opacity: 0; }
.shaft-cab  { transform: translateY(52px);  opacity: 0; }
.is-ready .shaft-cw  { animation: settle-down 1.15s cubic-bezier(0.34, 0.9, 0.3, 1) 0.75s forwards; }
.is-ready .shaft-cab { animation: settle-up   1.15s cubic-bezier(0.34, 0.9, 0.3, 1) 0.75s forwards; }
.shaft-meta { opacity: 0; }
.is-ready .shaft-meta { animation: fade-in 0.7s ease 1.6s forwards; }

@keyframes draw        { to { stroke-dashoffset: 0; } }
@keyframes settle-down { to { transform: translateY(0); opacity: 1; } }
@keyframes settle-up   { to { transform: translateY(0); opacity: 1; } }
@keyframes fade-in     { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .shaft-cable { stroke-dashoffset: 0; }
  .shaft-cw, .shaft-cab, .shaft-meta { transform: none; opacity: 1; }
  .is-ready .shaft-cable,
  .is-ready .shaft-cw,
  .is-ready .shaft-cab,
  .is-ready .shaft-meta { animation: none; }
}

/* --- o furo ------------------------------------------------------------ */

.leak-head { max-width: 62ch; margin-bottom: clamp(38px, 5vw, 62px); }
.leak-head h2 { margin-bottom: 20px; }
.leak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--rail);
  border: 1px solid var(--rail);
}
.leak-item {
  background: var(--graphite);
  padding: clamp(26px, 3vw, 38px);
}
.leak-item h3 { margin-bottom: 12px; }
.leak-item p { color: var(--mute); font-size: 0.96rem; }
.leak-code {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--alert);
  display: block;
  margin-bottom: 18px;
}

/* --- a maquina --------------------------------------------------------- */

.machine { border-top: 1px solid var(--rail); }
.machine-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 68px);
}
.machine-head p { color: var(--mute); }
@media (max-width: 820px) { .machine-head { grid-template-columns: 1fr; } }

.part {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(28px, 3.4vw, 44px);
  border-top: 1px solid var(--rail);
  align-items: start;
}
.part:last-child { border-bottom: 1px solid var(--rail); }
.part-code {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--brass);
  padding-top: 6px;
}
.part-name { margin-bottom: 10px; }
.part-what {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--mute);
  letter-spacing: 0.02em;
}
.part-desc { color: #bcc5cb; font-size: 0.98rem; }
@media (max-width: 820px) {
  .part { grid-template-columns: 68px minmax(0, 1fr); }
  .part-desc { grid-column: 2; }
}

/* --- case (papel) ------------------------------------------------------ */

.case-sheet {
  border: 1px solid rgba(17, 22, 25, 0.22);
  background: var(--paper-2);
}
.case-client { text-transform: none; font-size: 0.82rem; color: var(--ink); letter-spacing: 0.06em; }
.case-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(22px, 3vw, 34px);
  border-bottom: 1px solid rgba(17, 22, 25, 0.22);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-ink);
}
.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(28px, 4vw, 54px);
  padding: clamp(28px, 4vw, 52px) clamp(22px, 3vw, 34px);
}
@media (max-width: 880px) { .case-body { grid-template-columns: 1fr; } }

.case-figure {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 120%;
  font-size: clamp(3.1rem, 8vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}
.case-figure small {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-ink);
  margin-top: 14px;
  line-height: 1.6;
}
.case-caption {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 22, 25, 0.22);
  font-size: 0.95rem;
  color: #3c464b;
}
.case-list { margin: 0; padding: 0; list-style: none; }
.case-list li {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  padding-block: 15px;
  border-bottom: 1px dashed rgba(17, 22, 25, 0.24);
  font-size: 0.97rem;
}
.case-list li:first-child { padding-top: 0; }
.case-list dt, .case-list .k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute-ink);
  padding-top: 3px;
}
@media (max-width: 520px) {
  .case-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* --- para quem --------------------------------------------------------- */

.fit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--rail);
  border: 1px solid var(--rail);
  margin-top: clamp(34px, 4vw, 54px);
}
.fit-item {
  background: var(--graphite);
  padding: 26px 24px;
  font-size: 0.98rem;
}
.fit-item::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--brass);
  margin-bottom: 16px;
}
@media (max-width: 1000px) { .fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .fit-grid { grid-template-columns: 1fr; } }
.fit-rule {
  margin-top: clamp(34px, 4vw, 52px);
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--rail);
  border-left: 2px solid var(--brass);
  color: #c7cfd4;
  max-width: 76ch;
}

/* --- formulario -------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }

.form-side h2 { margin-bottom: 20px; }
.form-side p { color: #3c464b; }
.form-steps { margin: 30px 0 0; padding: 0; list-style: none; }
.form-steps li {
  padding: 14px 0 14px 30px;
  border-top: 1px solid rgba(17, 22, 25, 0.2);
  font-size: 0.95rem;
  position: relative;
}
.form-steps li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 25px;
  width: 14px;
  height: 1px;
  background: #8a6a1f;
}

.sheet {
  background: #f2f3ef;
  border: 1px solid rgba(17, 22, 25, 0.28);
  padding: clamp(24px, 3.4vw, 40px);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-ink);
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(17, 22, 25, 0.28);
}

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } }

.field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute-ink);
}
.field label .req { color: var(--alert); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: #fbfbf9;
  border: 1px solid rgba(17, 22, 25, 0.3);
  border-radius: 0;
  padding: 13px 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
}
.field textarea { min-height: 118px; resize: vertical; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--mute-ink) 50%),
                    linear-gradient(135deg, var(--mute-ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #8a6a1f;
  box-shadow: inset 0 0 0 1px #8a6a1f;
}
.field-error input,
.field-error select,
.field-error textarea { border-color: var(--alert); }
.field small {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--alert);
  min-height: 1em;
}

/* Armadilha para robo: invisivel para gente, preenchida por script. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sheet-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 22, 25, 0.28);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sheet-legal {
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--mute-ink);
}
.form-alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--alert);
  background: rgba(207, 91, 60, 0.09);
  font-size: 0.92rem;
  color: #8f2f16;
}
.form-alert[hidden] { display: none; }

/* --- rodape ------------------------------------------------------------ */

.foot {
  border-top: 1px solid var(--rail);
  padding-block: 46px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.foot a { color: var(--mute); text-decoration: none; }
.foot a:hover { color: var(--brass); }

/* --- pagina de obrigado ------------------------------------------------ */

.done { min-height: 78vh; display: flex; align-items: center; }
.done-in { max-width: 62ch; }
.done h1 { margin-bottom: 24px; }
.done-next { margin: 34px 0 0; padding: 0; list-style: none; }
.done-next li {
  padding: 16px 0 16px 34px;
  border-top: 1px solid var(--rail);
  position: relative;
  color: #c7cfd4;
}
.done-next li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 28px;
  width: 14px;
  height: 1px;
  background: var(--brass);
}
