/* ==========================================================================
   Auto Suíça — Base: reset, tipografia e utilitários
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-2));
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
}

:where(ul[class], ol[class]) {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Bloquear o scroll enquanto o menu mobile está aberto */
html.is-locked,
html.is-locked body {
  overflow: hidden;
}

/* Tipografia */
h1, h2, h3, .stat__number, .price {
  font-family: var(--font-heading);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2 {
  font-style: italic;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 0.95rem + 3vw, 2.5rem);
  line-height: 1.1;
}

h3 {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.stat__number,
.phone {
  font-variant-numeric: tabular-nums;
}

.text-accent {
  color: var(--color-primary);
}

/* Linha fixa de um título (quebras controladas) */
.title-line {
  display: block;
}

@media (min-width: 768px) {
  body {
    font-size: 17px;
  }

  h3 {
    font-size: 16px;
  }
}

/* Foco visível (anel vermelho) */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* Destinos de foco programático (ex.: <main> após "Saltar para o conteúdo") */
[tabindex="-1"]:focus {
  outline: none;
}

/* Utilitários */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

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

.is-hidden {
  display: none;
}

/* Link "Saltar para o conteúdo" */
.skip-link {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 200;
  padding: 12px 18px;
  background: var(--color-dark);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform var(--duration) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Movimento reduzido: cada componente desliga as suas animações
   no respetivo ficheiro (sem !important) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip-link {
    transition: none;
  }
}
