/* Malauí — captura de lead (GHL)
   Marca: verde floresta #284838 · laranja #D07038 · tema claro */

:root {
  --green: #284838;
  --green-deep: #1f3a2c;
  --green-soft: #3a5c4a;
  --green-mist: #e8f0eb;
  --orange: #ee7532;
  --orange-bright: #f5874a;
  --paper: #fbfaf7;
  --paper-2: #ffffff;
  --ink: #1a2420;
  --ink-muted: rgba(26, 36, 32, 0.72);
  --ink-faint: rgba(26, 36, 32, 0.55);
  --line: rgba(40, 72, 56, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --max: 720px;
  --header-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--green);
}

code {
  font-size: 0.85em;
  color: var(--orange);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Atmosphere */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(40, 72, 56, 0.1), transparent 58%),
    radial-gradient(ellipse 55% 40% at 95% 75%, rgba(208, 112, 56, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 30% at 5% 85%, rgba(40, 72, 56, 0.06), transparent 50%),
    var(--paper);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 241, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

.brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.header-tagline {
  margin: 0;
  max-width: 11rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--orange);
  text-transform: lowercase;
}

@media (max-width: 420px) {
  .header-tagline {
    display: none;
  }

  .header-inner {
    justify-content: center;
  }
}

/* Hero */
.hero {
  padding: clamp(1.25rem, 4vw, 3rem) 0 clamp(0.85rem, 2.5vw, 1.5rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.hero h1 {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: clamp(1.85rem, 6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--green);
}

.mesa-badge {
  display: inline-block;
  margin: 0.85rem 0 0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(40, 72, 56, 0.1);
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Form panel */
.form-section {
  padding: 0 0 clamp(2rem, 6vw, 4rem);
}

.form-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow:
    0 1px 2px rgba(40, 72, 56, 0.04),
    0 18px 48px rgba(40, 72, 56, 0.08);
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}

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

.form-panel__head {
  padding: clamp(1.15rem, 3.5vw, 1.75rem) clamp(1.1rem, 4vw, 2rem) 0.35rem;
  text-align: center;
}

.form-panel__head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--green);
}

.form-panel__head p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.form-body {
  padding: 0.85rem clamp(1rem, 4vw, 2rem) clamp(1.25rem, 4vw, 1.75rem);
  overflow: hidden;
}

.cadastro-form {
  display: grid;
  gap: 0.95rem;
  min-width: 0;
}

.field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
}

.field-optional {
  font-weight: 400;
  color: var(--ink-faint);
}

.field input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 3.1rem;
  line-height: 1.25;
}

.field input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

.field input::placeholder {
  color: var(--ink-faint);
}

.field input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(238, 117, 50, 0.18);
  background: #fff;
}

@media (max-width: 480px) {
  :root {
    --header-h: 72px;
  }

  .brand img {
    width: 60px;
    height: 60px;
  }

  .wrap {
    width: min(100% - 1.5rem, var(--max));
  }

  .field input {
    font-size: 16px; /* evita zoom no iOS */
    padding: 0.75rem 0.85rem;
  }

  .field input[type="date"] {
    padding-inline: 0.75rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1.25rem;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(208, 112, 56, 0.28);
}

.btn-primary:hover {
  background: var(--orange-bright);
  color: #fff;
  transform: translateY(-1px);
}

.redirect-status {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-muted);
  animation: rise 0.45s var(--ease) both;
}

.redirect-status[hidden] {
  display: none;
}

.redirect-status p {
  margin: 0;
  max-width: 22rem;
  line-height: 1.5;
}

.redirect-status strong {
  color: var(--green);
  font-size: 1.1rem;
}

.redirect-status__pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
  animation: pulse 1.2s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .redirect-status__pulse {
    animation: none;
  }
}

/* Footer */
.site-footer {
  background: var(--green);
  padding: clamp(2rem, 5vw, 2.75rem) 0;
}

.footer-inner {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.footer-logo {
  width: min(160px, 40vw);
  height: auto;
  object-fit: contain;
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(247, 245, 241, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-instagram:hover {
  color: var(--orange-bright);
}

.footer-instagram span {
  font-size: 0.85em;
}

/* Homepage */
.page-home {
  min-height: 100vh;
  min-height: 100dvh;
}

.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.1rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.home-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.home-logo-glow {
  position: absolute;
  inset: 8% 12%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(238, 117, 50, 0.35) 0%,
    rgba(40, 72, 56, 0.18) 45%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0.7);
  animation: glow-ignite 1.8s var(--ease) 0.2s forwards;
  pointer-events: none;
  z-index: 0;
}

.home-logo {
  position: relative;
  z-index: 1;
  width: min(220px, 52vw);
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: brightness(0.55) saturate(0.7);
  transform: scale(0.92);
  animation: logo-ignite 1.6s var(--ease) 0.15s forwards;
}

.home-tagline {
  margin: 0;
  max-width: 16rem;
  color: var(--orange);
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: lowercase;
  opacity: 0;
  transform: translateY(8px);
  animation: home-fade-up 0.8s var(--ease) 1.1s forwards;
}

.home-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  animation: home-fade-up 0.8s var(--ease) 1.35s forwards;
}

.home-instagram:hover {
  color: var(--orange);
}

.home-instagram span {
  font-size: 0.85em;
}

@keyframes logo-ignite {
  0% {
    opacity: 0;
    filter: brightness(0.45) saturate(0.5);
    transform: scale(0.9);
  }
  45% {
    opacity: 1;
    filter: brightness(1.15) saturate(1.15);
    transform: scale(1.03);
  }
  70% {
    filter: brightness(1.05) saturate(1.05);
    transform: scale(1);
  }
  100% {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: scale(1);
  }
}

@keyframes glow-ignite {
  0% {
    opacity: 0;
    transform: scale(0.65);
  }
  40% {
    opacity: 0.9;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
}

@keyframes home-fade-up {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .form-panel,
  .home {
    animation: none;
  }

  .home-logo,
  .home-tagline,
  .home-instagram,
  .home-logo-glow {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  .home-logo-glow {
    opacity: 0.35;
  }
}
