/* ============================================================
   SMC — Base / Reset & primitives
   ============================================================ */

/* ---- Self-hosted Inter (no Google Fonts CDN → no IP leak / GDPR) ----
   url() is resolved relative to this file, so ../assets/fonts works
   from both root pages and /en/ pages. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-700-normal.woff2") format("woff2");
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--surface-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--navy-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Salto della navigazione: primo elemento focalizzabile della pagina,
   fuori schermo finché non riceve il focus da tastiera (WCAG 2.4.1). */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  transform: translateY(-120%);
  padding: 0.75rem 1.25rem;
  background: var(--navy-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Typography helpers ---- */
.display {
  font-size: var(--fs-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-display);
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

.h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-display);
  color: var(--text-heading);
}

.h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--text-heading);
}

.h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--text-heading);
}

.lead {
  font-size: var(--fs-body);
  color: var(--text-body);
}

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

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

/* Full-bleed hairline that aligns with the content gutters */
.rule {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  max-width: var(--page-max);
  margin-inline: auto;
  margin-block: 0;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-button);
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  text-align: center;
  border: 2px solid transparent;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--navy-primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-button);
}

.btn--primary:hover {
  background: var(--navy-dark);
}

.btn--outline {
  background: transparent;
  color: var(--navy-primary);
  border-color: var(--navy-primary);
  box-shadow: var(--shadow-button);
}

.btn--outline:hover {
  background: var(--navy-primary);
  color: var(--text-on-dark);
}

/* Outline button sitting on a dark/photographic background */
.btn--on-dark {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--text-on-dark);
}

.btn--on-dark:hover {
  background: var(--text-on-dark);
  color: var(--navy-primary);
}

/* Inline "Scopri →" style link */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--fw-semibold);
  color: var(--link-primary);
}

.cta-link .cta-link__arrow {
  width: 18px;
  height: auto;
  transition: transform var(--dur) var(--ease);
}

.cta-link:hover {
  text-decoration: none;
}

.cta-link:hover .cta-link__arrow {
  transform: translateX(4px);
}
