:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

body.dialog-open { overflow: hidden; }
button, input { font: inherit; }

.landing {
  position: fixed;
  inset: 0;
  width: 100%;
  height: auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.hero-frame {
  position: relative;
  width: min(100vw, calc(100dvh * 738 / 1599));
  height: min(100dvh, calc(100vw * 1599 / 738));
  aspect-ratio: 738 / 1599;
  overflow: hidden;
  background: #000;
}

.landing-image {
  position: absolute;
  inset: 0;
}

.landing-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.landing-actions {
  position: absolute;
  z-index: 5;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.download-button,
.whatsapp-button {
  width: 100%;
  min-width: 0;
  min-height: clamp(34px, 10.5vw, 52px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.8vw, 10px);
  padding: 0 clamp(6px, 2vw, 16px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: clamp(10px, 3vw, 16px);
  text-decoration: none;
  cursor: pointer;
  font-weight: 850;
  font-size: clamp(10px, 3.1vw, 14px);
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}

.download-button {
  color: #172016;
  background: #f5bd45;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
}

.whatsapp-button {
  color: white;
  background: #20ad68;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
}

.download-button:hover,
.whatsapp-button:hover { transform: translateY(-2px); }
.whatsapp-button:hover { background: #17985a; }
.download-button:hover { background: #ffd067; }
.download-button:focus-visible, .whatsapp-button:focus-visible, .dialog-submit:focus-visible, .dialog-close:focus-visible {
  outline: 3px solid #f5bd45;
  outline-offset: 3px;
}
.download-button svg,
.whatsapp-button svg {
  width: clamp(16px, 5vw, 23px);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-dialog {
  width: min(500px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: #102019;
  background: white;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
}
.contact-dialog::backdrop { background: rgba(2, 10, 6, .82); backdrop-filter: blur(8px); }
.contact-dialog form { position: relative; padding: 38px; }
.dialog-close {
  position: absolute;
  right: 16px;
  top: 13px;
  width: 42px;
  height: 42px;
  border: 0;
  color: #607067;
  background: none;
  cursor: pointer;
  font-size: 29px;
}
.dialog-icon {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: #20ad68;
  font-size: 25px;
  font-weight: 900;
}
.dialog-kicker {
  margin: 18px 0 3px;
  color: #13804e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.contact-dialog h1 { margin: 0; font: 700 34px/1.12 Georgia, serif; }
.contact-dialog h1 + p { margin: 11px 0 22px; color: #65736b; font-size: 14px; }
.contact-dialog label { display: block; margin: 14px 0 6px; font-size: 12px; font-weight: 800; }
.contact-dialog input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #d4dcd5;
  border-radius: 12px;
  color: #102019;
  background: #fbfcfa;
  outline: none;
}
.contact-dialog input:focus { border-color: #1c9d68; box-shadow: 0 0 0 3px rgba(28, 157, 104, .12); }
.contact-dialog input[aria-invalid="true"] { border-color: #d93941; }
.field-error { display: block; min-height: 18px; color: #c82d35; font-size: 11px; }
.message-preview { margin: 14px 0 18px; padding: 13px 15px; border-radius: 12px; background: #eef7f1; }
.message-preview span { color: #18794f; font-size: 10px; font-weight: 900; letter-spacing: 1.3px; text-transform: uppercase; }
.message-preview p { margin: 5px 0 0; color: #48584f; font-size: 12px; line-height: 1.5; }
.dialog-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: #20ad68;
  cursor: pointer;
  font-weight: 850;
}
.contact-dialog small { display: block; margin-top: 11px; color: #77847c; text-align: center; }

@media (max-width: 600px) {
  .landing-actions {
    bottom: max(11px, env(safe-area-inset-bottom));
  }
  .download-button,
  .whatsapp-button {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .48);
  }
  .contact-dialog form { padding: 31px 21px 23px; }
}

@media (max-width: 767px) and (orientation: landscape) {
  .landing-actions {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .download-button,
  .whatsapp-button {
    min-height: 34px;
    font-size: 10px;
  }
  .download-button svg,
  .whatsapp-button svg {
    width: 16px;
  }
}

@media (min-width: 768px) and (orientation: landscape) {
  .hero-frame {
    --landscape-action-band: 80px;
    width: min(100vw, calc((100vh - var(--landscape-action-band)) * 3 / 2));
    height: min(100vh, calc((100vw * 2 / 3) + var(--landscape-action-band)));
    aspect-ratio: auto;
  }
  .hero-frame .landing-image {
    bottom: var(--landscape-action-band);
  }
  .hero-frame .landing-actions {
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
