:root {
  --bg: #0a121c;
  --text: #f4f7fb;
  --whatsapp: #1e9550;
  --whatsapp-hover: #1a8447;
  --whatsapp-active: #176f3d;
  --focus: #7dd3fc;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --app-h: 100dvh;
  --btn-h: 2.7rem;
  --btn-w: 18.45rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body:not(.page) {
  height: 100vh;
  height: 100dvh;
  height: var(--app-h);
  overflow: hidden;
}

body.page {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

img {
  max-width: 100%;
  height: auto;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(46, 98, 196, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(28, 64, 128, 0.38), transparent 62%),
    linear-gradient(165deg, #0c1828 0%, var(--bg) 42%, #08101a 100%);
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-h);
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  overflow-x: hidden;
  padding:
    max(1.25rem, calc(0.9rem + var(--safe-top)))
    max(1.25rem, calc(1.15rem + var(--safe-right)))
    0
    max(1.25rem, calc(1.15rem + var(--safe-left)));
}

.cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5.5vh, 3.35rem);
  width: 100%;
  max-width: 37.75rem;
  min-width: 0;
  align-self: center;
  transform: translateY(-2.5%);
}

.stack {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.actions {
  width: 100%;
  max-width: var(--btn-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.btn {
  display: grid;
  grid-template-columns: var(--btn-h) minmax(0, 1fr) var(--btn-h);
  align-items: center;
  width: 100%;
  min-height: var(--btn-h);
  height: var(--btn-h);
  padding: 0;
  border-radius: 999px;
  overflow: visible;
  text-decoration: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-icon,
.btn-arrow {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.btn-icon svg,
.btn-arrow svg {
  display: block;
  overflow: visible;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-whatsapp .btn-icon svg {
  width: 1.36rem;
  height: 1.36rem;
}

.btn-prospectus .btn-icon svg {
  width: 1.42rem;
  height: 1.25rem;
}

.btn-arrow svg {
  width: 0.95rem;
  height: 0.95rem;
  opacity: 0.72;
}

.btn-label {
  min-width: 0;
  text-align: center;
  padding: 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-whatsapp {
  background: var(--whatsapp);
  border: 1px solid var(--whatsapp);
}

.btn-mail,
.btn-prospectus {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.btn-whatsapp:active {
  background: var(--whatsapp-active);
  border-color: var(--whatsapp-active);
}

.btn-mail:active,
.btn-prospectus:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.legal {
  position: relative;
  z-index: 2;
  justify-self: center;
  max-width: 100%;
  margin: 0 0 max(1.35rem, calc(0.85rem + var(--safe-bottom)));
  padding: 0.85rem 0.5rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.4;
}

.legal a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 0.55rem 0.2rem;
  margin: -0.55rem -0.2rem;
}

.legal a:focus-visible {
  color: #fff;
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.legal-page {
  position: relative;
  z-index: 1;
  width: min(44rem, 100%);
  margin: 0 auto;
  padding:
    max(2.25rem, calc(1.5rem + var(--safe-top)))
    max(1.25rem, calc(1.15rem + var(--safe-right)))
    max(3.25rem, calc(2.25rem + var(--safe-bottom)))
    max(1.25rem, calc(1.15rem + var(--safe-left)));
}

.legal-page h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  font-weight: 700;
}

.legal-page h2 {
  margin: 1.75rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.legal-page p,
.legal-page address {
  margin: 0 0 0.7rem;
  font-style: normal;
  line-height: 1.65;
  color: #d5dbe6;
  overflow-wrap: break-word;
}

.legal-page a {
  color: #93c5fd;
  text-decoration: none;
}

.legal-page a.back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin: -0.35rem 0 1.1rem;
  padding: 0.35rem 0.15rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.legal-page a.back:active,
.legal-page a.back:focus-visible {
  color: #fff;
}

.legal-page a.back:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .btn-mail:hover,
  .btn-prospectus:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.94);
  }

  .btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    border-color: var(--whatsapp-hover);
  }

  .legal a:hover,
  .legal-page a.back:hover {
    color: #fff;
  }

  .legal-page a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 480px) {
  :root {
    --btn-h: 2.745rem;
    --btn-w: 17.55rem;
  }

  .cluster {
    gap: clamp(1.35rem, 6.2vh, 2.6rem);
  }

  .btn {
    font-size: clamp(0.8rem, 3.7vw, 0.9rem);
  }
}

@media (max-width: 360px) {
  .btn {
    font-size: 0.78rem;
    letter-spacing: 0;
  }
}

@media (min-width: 768px) {
  :root {
    --btn-h: 2.835rem;
    --btn-w: 19.35rem;
  }

  .cluster {
    gap: clamp(2rem, 6vh, 3.6rem);
  }

  .btn {
    font-size: 0.95rem;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .cluster {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(1.25rem, 5vw, 2.75rem);
    width: 100%;
    max-width: 52rem;
    transform: none;
  }

  .stack {
    width: auto;
    max-width: 22rem;
    flex: 1 1 12rem;
    min-width: 0;
  }

  .actions {
    width: auto;
    max-width: 18.45rem;
    flex: 1 1 12rem;
    min-width: 0;
  }

  .legal {
    margin-bottom: max(0.7rem, var(--safe-bottom));
    padding-top: 0.45rem;
  }
}

@media (orientation: landscape) and (max-height: 380px) {
  :root {
    --btn-h: 2.475rem;
  }

  .actions {
    gap: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
