/* =========================================================
   GLOBAL
   Regole di base condivise da tutto il sito
   ========================================================= */


/* =========================
   FONT
   ========================= */

@font-face {
  font-family: "Archivo";
  src: url("./fonts/Archivo/Archivo-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("./fonts/Archivo/Archivo-Italic-VariableFont_wdth,wght.ttf")
    format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

/* =========================
   VARIABLES
   ========================= */

:root {
  /* Colori principali */
  --color-background: #f2f1ed;
  --color-text: #151515;
  --color-muted: rgba(21, 21, 21, 0.45);
  --color-accent: var(--color-text);

  /* =========================
     PALETTE ACCENTI
     ========================= */


  --palette-blue: #0015ff;
  --palette-pink: #ff00a1;

  --palette-lime: #63c900;
  --palette-purple: #8400ff;

  --palette-cyan: #00aeb5;
  --palette-orange: #ff5a00;

  --palette-red: #ff2b2b;
  --palette-yellow: #d99a00;



  /* Tipografia */
  --font-primary: "Archivo", Arial, Helvetica, sans-serif;

  --font-size-small: 0.625rem;
  --font-size-base: 0.875rem;
  --font-size-medium: 1rem;

  --line-height-tight: 1;
  --line-height-base: 1.25;

  --letter-spacing-base: -0.02em;

  /* Spaziature */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Margini della griglia Figma */
  --page-padding-inline: 1.5rem;
  --page-padding-block: 1.5rem;

  /* Transizioni */
  --transition-fast: 180ms ease;
  --transition-base: 300ms ease;

  /* Livelli */
  --z-content: 1;
  --z-navigation: 10;
  --z-overlay: 20;
}


/* =========================
   RESET
   ========================= */

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

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

body {
  min-height: 100%;
  margin: 0;

  background-color: var(--color-background);
  color: var(--color-text);

  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}


/* =========================
   TYPOGRAPHY
   ========================= */

h1,
h2,
h3,
h4,
button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: var(--line-height-tight);
}

p {
  max-width: 70ch;
}

strong,
b {
  font-weight: 600;
}


/* =========================
   LINKS
   ========================= */

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}


/* =========================
   BUTTONS
   ========================= */

button {
  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;

  text-align: inherit;
  cursor: pointer;
}


/* =========================
   MEDIA
   ========================= */

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

img,
video {
  height: auto;
}

img {
  font-style: italic;
}

video {
  background-color: var(--color-text);
}


/* =========================
   FORM ELEMENTS
   ========================= */

input,
textarea,
select {
  color: inherit;
  background-color: transparent;
}

textarea {
  resize: vertical;
}


/* =========================
   ACCESSIBILITY
   ========================= */

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 0.25rem;
}

::selection {
  background-color: var(--color-text);
  color: var(--color-background);
}

[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;

  overflow: hidden;

  clip: rect(0 0 0 0);
  clip-path: inset(50%);

  border: 0;
  white-space: nowrap;
}


/* =========================
   SCROLLBARS
   ========================= */

.scroll-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}


/* =========================
   REDUCED MOTION
   ========================= */

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

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


