/* ============================================================
   BASE.CSS — reset, custom properties, tipografia, utility
   ============================================================ */

/* --- Google Fonts: caricati in index.html via <link> --- */

/* ---- Custom Properties ---- */
:root {
  /* Brand Colors */
  --c-yellow: #FAC306;
  --c-green: #0A7C0B;
  --c-blue: #095FA8;
  --c-orange: #EB6E02;
  --c-red: #DB0B0D;

  /* Neutral */
  --c-text: #0B2A4A;
  --c-text-sec: #5B6470;
  --c-bg-alt: #F7F8FA;
  --c-white: #FFFFFF;
  --c-border: #E2E6EA;

  /* Service color map (used via var() in section CSS) */
  --c-service-consulenza: var(--c-yellow);
  --c-service-condominio: var(--c-green);
  --c-service-property: var(--c-blue);
  --c-service-verde: var(--c-orange);
  --c-service-accent: var(--c-red);

  /* Typography */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, Arial, sans-serif;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1.25rem;

  /* Border radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(11, 42, 74, .08);
  --shadow-md: 0 4px 16px rgba(11, 42, 74, .12);
  --shadow-lg: 0 8px 32px rgba(11, 42, 74, .16);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 450ms ease;

  /* Z-index */
  --z-header: 100;
  --z-mobile: 200;
  --z-preload: 1000;
}

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

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

@media (min-width: 1440px) {
  html {
    font-size: 17px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--c-text);
}

h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  padding-top: 0.4em;
  padding-bottom: 0.6em;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
}

h4 {
  font-size: 1.1rem;
}



/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---- Nastro (5-bar separator) ---- */
.nastro {
  display: flex;
  height: 6px;
  overflow: hidden;
}

.nastro__bar {
  flex: 1;
  background: var(--bar-color);
  transition: background-position 8s linear infinite;
}

.nastro--yellow {
  background: var(--c-yellow);
}

.nastro--green {
  background: var(--c-green);
}

.nastro--blue {
  background: var(--c-blue);
}

.nastro--orange {
  background: var(--c-orange);
}

.nastro--red {
  background: var(--c-red);
}

/* Nastro shimmer (non-reduced-motion only) */
@media (prefers-reduced-motion: no-preference) {
  .nastro--animated .nastro__bar {
    background-size: 200% 100%;
    animation: nastro-shimmer 6s ease-in-out infinite alternate;
  }

  @keyframes nastro-shimmer {
    0% {
      filter: brightness(1);
    }

    100% {
      filter: brightness(1.15);
    }
  }
}

/* ---- H2 underline decorativo ---- */
.section-title-wrap .nastro {
  width: 80px;
  height: 4px;
  margin-top: var(--sp-4);
  border-radius: 2px;
}

/* ---- Label uppercase ---- */
.label-tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-sec);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-base);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px) scale(1.02);
}

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

.btn--primary {
  background: var(--c-red);
  color: var(--c-white);
  box-shadow: 0 4px 14px rgba(219, 11, 13, .3);
}

.btn--primary:hover {
  background: #c00a0c;
  box-shadow: 0 6px 20px rgba(219, 11, 13, .35);
}

.btn--outline {
  background: transparent;
  color: var(--c-blue);
  border: 2px solid var(--c-blue);
}

.btn--outline:hover {
  background: var(--c-blue);
  color: var(--c-white);
}

.btn--ghost {
  background: rgba(255, 255, 255, .12);
  color: var(--c-white);
  border: 1.5px solid rgba(255, 255, 255, .4);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, .22);
}

/* ---- Scroll reveal utility ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Focus visible ---- */
:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---- Accessibility: screen-reader only ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Section base spacing ---- */
.section {
  padding-block: var(--sp-20);
}

.section--alt {
  background: var(--c-bg-alt);
}

/* ---- Responsive breakpoints (mobile-first) ----
   sm:  640px
   md:  768px
   lg: 1024px
   xl: 1280px
  2xl: 1440px
  3xl: 1920px
---- */

@media (min-width: 1440px) {
  :root {
    --container-max: 1380px;
    --container-pad: 2rem;
  }
}

@media (min-width: 1920px) {
  :root {
    --container-max: 1600px;
  }
}