/* ==========================================================================
   MARS — Base Styles | css/base.css
   Reset + typografia + layout utilities
   ========================================================================== */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Typografia ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap-lg);
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background-color: var(--color-bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: var(--gap-2xl);
}

.section__subtitle {
  color: var(--color-text-muted);
  font-size: var(--font-size-body);
  margin-top: var(--gap-sm);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--gap-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: var(--section-padding-sm);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-small  { font-size: var(--font-size-small); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Selection ---------- */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* ---------- Print ---------- */
@media print {
  .nav,
  .cookie-banner,
  .nav__hamburger,
  .hero__actions,
  .btn,
  .contact-map,
  #contact-form,
  .footer__bottom .nav__lang,
  #app-version {
    display: none !important;
  }

  .hero {
    padding-top: 20px;
  }

  .section {
    padding: 20px 0;
    break-inside: avoid;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .logo-grid__item img {
    filter: grayscale(100%) !important;
  }
}
