/* Ympact Lifestyle — stili condivisi (pagine pubbliche e login).
   Palette e font dal design system Ympact, come il minisito di Natale. */

@font-face {
  font-family: "Avenir";
  src: url("/assets/fonts/avenir-book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir";
  src: url("/assets/fonts/avenir-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir";
  src: url("/assets/fonts/avenir-heavy.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir";
  src: url("/assets/fonts/avenir-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ymp-navy: #141f2a;
  --ymp-navy-deep: #0c131a;
  --ymp-navy-mid: #1b2c3b;
  --ymp-green-dark: #00542e;
  --ymp-green-light: #a2c965;
  --ymp-gold: #e9c46a;

  --bg-page: #111a23;
  --bg-surface: #1e2b38;
  --bg-surface-hover: #23313d;
  --fg: #fcfcfd;
  --fg-muted: rgba(255, 255, 255, 0.78);
  --fg-subtle: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.12);
  --accent: var(--ymp-green-light);
  --on-accent: var(--ymp-navy);

  --font: "Avenir", "Avenir Next", "Nunito Sans", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1120px;
  --radius: 18px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-page);
  color: var(--fg);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

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

.eyebrow {
  margin: 0;
  font: 500 13px/1.2 var(--font);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.rule {
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ymp-green-light), var(--ymp-gold));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 500 16px/1 var(--font);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(162, 201, 101, 0.25);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: progress;
  transform: none;
}
.btn svg {
  flex: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 14px/1 var(--font);
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
}
.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--fg-subtle);
}

/* Sfondo con "scie" a forma di Y, come nell'intro del minisito di Natale */
.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sky .trail {
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
}
.sky .trail.dash {
  stroke-dasharray: 5 16;
  animation: trail 14s linear infinite;
}
.sky .star {
  fill: #fff;
  opacity: 0.15;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes trail {
  to {
    stroke-dashoffset: -420;
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sky .trail.dash,
  .sky .star {
    animation: none;
  }
  .btn,
  .btn:hover {
    transition: none;
    transform: none;
  }
}

/* Come ympact.xyz: il grassetto nel testo usa l'Avenir Black. */
strong,
b {
  font-weight: 900;
}
