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

html {
  scroll-behavior: smooth;
}

:root {
  --dm-header-h: calc(var(--dm-topbar-h) + var(--dm-nav-h));
  --dm-snap-offset: calc(var(--dm-header-h) + 8px);
  --dm-section-h: calc(100vh - var(--dm-snap-offset));
}

@supports (height: 100svh) {
  :root {
    --dm-section-h: calc(100svh - var(--dm-snap-offset));
  }
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.dm-section {
  padding: 2.5rem 0;
}

.dm-content {
  max-width: 48rem;
}

.dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dm-btn--cta {
  background: var(--dm-orange);
  color: var(--dm-white);
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.dm-btn--cta:hover {
  filter: brightness(1.05);
}

.dm-btn--cta:active {
  transform: translateY(1px);
}

.dm-btn--block {
  width: 100%;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .dm-container {
    width: min(100% - 1.5rem, var(--dm-container));
  }
}

/* ========== Secciones a pantalla completa ========== */
.dm-hero,
.dm-team {
  scroll-margin-top: var(--dm-snap-offset);
}

/* El enganche solo se activa donde hay alto suficiente para que una sección
   ocupe la pantalla; en móvil y pantallas bajas el scroll queda libre. */
@media (min-width: 961px) and (min-height: 640px) {
  html {
    scroll-snap-type: y proximity;
  }

  .dm-hero,
  .dm-projects,
  .dm-sistema,
  .dm-zip,
  .dm-edimca,
  .dm-team {
    scroll-snap-align: start;
  }

  .dm-footer {
    scroll-snap-align: end;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
