footer.reference-footer {
  --accent: var(--theme-contrast, #00d1ff);
  --font-mono: 'NON Natural Mono', monospace;
  --font-display: 'NON Natural Grotesk', sans-serif;
  position: relative;
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 140px;
  padding: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: #000000;
  color: #eee;
  font-family: var(--font-display);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.reference-footer * { box-sizing: border-box; }
.reference-footer .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reference-footer a { color: inherit; text-decoration: none; }
.reference-footer p, .reference-footer input { font-family: var(--font-display); }

/* Tier 1: Formulário centralizado entre as duas mãos ASCII */
.footer-hands-stage {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) 32px clamp(80px, 9vw, 120px);
  min-height: 680px;
  display: flex;
  align-items: center;
}
.footer-art {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44%;
  z-index: 1;
  pointer-events: none;
}
.footer-art-left { left: min(-13%, calc(50% - 285px - 44%)); }
.footer-art-right { right: min(-13%, calc(50% - 285px - 44%)); }
.footer-art canvas { width: 100%; height: 100%; display: block; pointer-events: auto; }

.footer-stage-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  pointer-events: none;
}
.footer-stage-inner a,
.footer-stage-inner button,
.footer-stage-inner form { pointer-events: auto; }

.footer-form-intro {
  position: relative;
  isolation: isolate;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-form-intro::before {
  content: "";
  position: absolute;
  inset: -28px -36px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 75% at 50% 50%, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 85%);
}
.footer-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.footer-eyebrow span { margin-right: 6px; }
.footer-form-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #f4f4f4;
}
.footer-form-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b4bcc4;
  max-width: 40ch;
}

.footer-form-column { min-width: 0; }
#contato-formulario {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0;
  scroll-margin-top: 96px;
}
.footer-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.footer-field-wide { grid-column: 1 / -1; }
.footer-field label {
  font: 400 10px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  color: #d4dce4;
  text-transform: uppercase;
}
.reference-footer :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 12, 16, 0.88);
  color: #f2f4f7;
  padding: 8px 11px;
  font: 400 13px/1.35 var(--font-display);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.reference-footer select { height: 36px; cursor: pointer; }
.reference-footer textarea { min-height: 66px; resize: vertical; }
.reference-footer :is(input, select, textarea):focus {
  border-color: var(--accent);
  background: rgba(12, 16, 22, 0.96);
}
.reference-footer :is(input, textarea)::placeholder {
  font-size: 12px;
  color: #8b949e;
}

.footer-message-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  justify-items: stretch;
}
.footer-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 10px;
  min-width: 200px;
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  background: #00d8ff;
  color: #031217;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 28px rgba(0, 209, 255, 0.22);
}
.footer-submit:hover:not(:disabled) {
  background: #3be4ff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 209, 255, 0.34);
}
.footer-submit:disabled { opacity: 0.55; cursor: wait; }
.footer-submit .submit-arrow { font-size: 17px; line-height: 1; transition: transform 0.2s ease; }
.footer-submit:hover:not(:disabled) .submit-arrow { transform: translateX(4px); }

.footer-form-note {
  position: relative;
  z-index: 2;
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #888;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}
.footer-form-note a { color: #d6e4ec; text-decoration: underline; text-underline-offset: 4px; }
.footer-form-note a:hover { color: var(--accent); }
#contact-status:empty { display: none; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Tier 2: Seção institucional abaixo das mãos */
.footer-bottom-band {
  position: relative;
  z-index: 2;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 56px 32px 0;
}
.footer-bottom-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.45fr 0.85fr 1fr 1.15fr;
  gap: 40px 36px;
  align-items: start;
}

.footer-brand-col { display: flex; flex-direction: column; gap: 18px; }
.footer-brand-top { display: flex; align-items: center; gap: 20px; }
.footer-brand-mark { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-brand-col .footer-logo-svg {
  display: block;
  width: 96px;
  height: auto;
  aspect-ratio: 1;
  color: #f4f4f4;
  margin: 0;
}
.footer-brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.36em;
  color: #f4f4f4;
}
.footer-brand-sub i { display: inline-block; width: 8px; height: 8px; background: var(--accent); }
.footer-brand-tagline {
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  font-size: 15px;
  line-height: 1.35;
  color: #e6ebf0;
  text-transform: uppercase;
}
.footer-brand-desc {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.55;
  color: #888;
}
.footer-availability {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #888;
  text-transform: uppercase;
}
.footer-availability p { display: flex; align-items: center; gap: 8px; margin: 0; }
.footer-availability span { flex-shrink: 0; width: 8px; height: 8px; display: inline-block; background: var(--accent); }

.footer-col-heading {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8b8b8;
}
.footer-col-heading span { color: var(--accent); margin-right: 6px; }

.footer-reference-nav,
.footer-servicos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  font-size: 15px;
  line-height: 1.4;
  color: #888;
}
.footer-reference-nav a:hover,
.footer-servicos a:hover,
.footer-reference-contact a:hover { color: var(--accent); }

.footer-reference-contact { display: flex; flex-direction: column; align-items: flex-start; color: #888; }
.footer-contact-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.footer-contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #888;
  overflow-wrap: anywhere;
}
.footer-contact-list svg { flex-shrink: 0; color: var(--accent); }
.footer-contact-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 16px 0;
}

.footer-reference-copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  color: #888;
  font-size: 13px;
  line-height: 22px;
  text-transform: uppercase;
  padding: 56px 0 32px;
}
.reference-footer .footer-reference-wordmark {
  display: block;
  position: relative;
  white-space: nowrap;
  color: #2b2b2b;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: min(calc((100vw - 64px) / 6.55), 320px);
  line-height: 0.73;
  letter-spacing: -0.08em;
  margin-left: -0.015em;
  padding-top: 12px;
}
.reference-footer .footer-reference-wordmark span { font-weight: 400; letter-spacing: -0.075em; }
.reference-footer .footer-reference-wordmark:hover { color: #555; }

/* Portfolio opening: large robot on the right, matching the live home composition. */
#home-rest #lantern { max-width: none; width: 100%; height: clamp(500px, 85vh, 940px); aspect-ratio: auto; overflow: hidden; }
#lantern canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
@media (max-width: 799px) { #home-rest #lantern { height: 65vh; min-height: 440px; } }

@media (max-width: 1040px) {
  .footer-art { width: 42%; opacity: 0.45; }
  .footer-art-left { left: -14%; }
  .footer-art-right { right: -14%; }
  .footer-stage-inner { grid-template-columns: 1fr; gap: 28px; max-width: 680px; }
  .footer-form-lead { max-width: none; }
  .footer-bottom-grid { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
}

@media (max-width: 640px) {
  .footer-hands-stage { padding: 56px 20px 64px; }
  .footer-art { width: 78%; opacity: 0.28; }
  .footer-art-left { left: -34%; }
  .footer-art-right { right: -34%; }
  #contato-formulario { grid-template-columns: 1fr; }
  .footer-field-wide { grid-column: auto; }
  .footer-message-row { grid-template-columns: 1fr; }
  .footer-submit { width: 100%; height: 50px; }
  .footer-bottom-band { padding: 44px 20px 0; }
  .footer-bottom-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-reference-wordmark { font-size: calc((100vw - 40px) / 6.55); }
}
