/* ==========================================================================
   Eliplast — base: reset, tipografia, utility
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-200);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sp-4);
  color: var(--c-navy);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-700); }
h2 { font-size: var(--fs-600); }
h3 { font-size: var(--fs-400); font-weight: 600; }
h4 { font-size: var(--fs-300); font-weight: 600; }

/* Stile di un livello diverso da quello semantico */
.h3 { font-size: var(--fs-400); font-weight: 600; }

p,
ul,
ol,
dl {
  margin: 0 0 var(--sp-4);
}

p {
  max-width: 68ch;
  text-wrap: pretty;
}

a {
  color: var(--c-blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--c-navy);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

strong {
  font-weight: 600;
}

address {
  font-style: normal;
}

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

/* --- Utility ------------------------------------------------------------ */

/* L'attributo hidden deve vincere su qualsiasi display dei componenti */
[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 1000;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-navy);
  color: var(--c-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--c-white);
  outline-color: var(--c-yellow);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + 2 * var(--gutter));
}

.lead {
  font-size: var(--fs-300);
  color: var(--c-ink);
}

.muted {
  color: var(--c-muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-3);
  font-family: var(--font-head);
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue-dark);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 3px;
  margin-right: var(--sp-2);
  vertical-align: middle;
  background: var(--c-yellow);
}

.flow > * + * {
  margin-top: var(--sp-4);
}

.flow > * {
  margin-bottom: 0;
}
