/* ================================================================
   VLASTIR v2 — DESIGN SYSTEM
   All tokens, reset, typography base
   ================================================================ */

/* ── Font self-hosted (nessun trasferimento a terzi / Google) ──
   Variable font, subset latin. File in /assets/fonts/. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-var-italic.woff2') format('woff2');
}

:root {

  /* ── Colors: Dark ── */
  --c-dark:         #0A0A0A;          /* primary deep black */
  --c-dark-2:       #141414;
  --c-surface:      #1A1A1A;          /* secondary dark */
  --c-surface-2:    #222222;
  --c-border-dark:  rgba(200,169,120,0.15);
  --c-border-dark-h:rgba(200,169,120,0.40);

  /* ── Colors: Light ── */
  --c-ivory:        #FAFAF8;          /* background */
  --c-warm:         #F2F0EB;
  --c-white:        #FFFFFF;
  --c-border-light: rgba(17,17,17,0.10);

  /* ── Colors: Brand ── */
  --c-gold:         #C8A978;          /* luxury gold accent */
  --c-gold-light:   #DBC097;
  --c-gold-dark:    #A8895C;
  --c-gold-glow:    rgba(200,169,120,0.12);
  --c-charcoal:     #1A1A1A;

  /* ── Colors: Text ── */
  --c-text-dark:    #FAFAF8;          /* on dark bg */
  --c-text-light:   #111111;          /* on light bg */
  --c-muted-dark:   rgba(250,250,248,0.55);
  --c-muted-light:  rgba(17,17,17,0.55);

  /* ── Typography ── */
  --f-serif: 'Playfair Display', 'Georgia', serif;
  --f-sans:  'Inter', 'Helvetica Neue', sans-serif;

  /* ── Font sizes ── */
  --fs-xs:   0.6875rem;   /* 11px — labels, overlines */
  --fs-sm:   0.8125rem;   /* 13px — meta, tags */
  --fs-base: 1rem;        /* 16px — body */
  --fs-md:   1.125rem;    /* 18px — lead */
  --fs-lg:   1.375rem;    /* 22px — card titles */
  --fs-xl:   1.75rem;     /* 28px — H3 */
  --fs-2xl:  2.25rem;     /* 36px — H2 */
  --fs-3xl:  3rem;        /* 48px — H1 secondary */
  --fs-hero: clamp(3.5rem, 8vw, 7rem);

  /* ── Font weights ── */
  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;

  /* ── Line heights ── */
  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-base:    1.6;
  --lh-relaxed: 1.8;

  /* ── Letter spacing ── */
  --ls-tight:   -0.02em;
  --ls-normal:   0;
  --ls-wide:     0.06em;
  --ls-widest:   0.14em;

  /* ── Spacing (8px base) ── */
  --sp-1:   0.25rem;   /*  4px */
  --sp-2:   0.5rem;    /*  8px */
  --sp-3:   0.75rem;   /* 12px */
  --sp-4:   1rem;      /* 16px */
  --sp-5:   1.25rem;   /* 20px */
  --sp-6:   1.5rem;    /* 24px */
  --sp-8:   2rem;      /* 32px */
  --sp-10:  2.5rem;    /* 40px */
  --sp-12:  3rem;      /* 48px */
  --sp-16:  4rem;      /* 64px */
  --sp-20:  5rem;      /* 80px */
  --sp-24:  6rem;      /* 96px */
  --sp-32:  8rem;      /* 128px */

  /* ── Border radius ── */
  --r-sm:   2px;
  --r-md:   8px;
  --r-lg:   16px;
  --r-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg:  0 24px 64px rgba(0,0,0,0.18);
  --shadow-gold:0 8px 32px rgba(196,162,98,0.20);

  /* ── Borders ── */
  --border-thin:  1px solid var(--c-border-light);
  --border-dark:  1px solid var(--c-border-dark);
  --border-gold:  1px solid var(--c-gold);

  /* ── Animation ── */
  --dur-fast:  200ms;
  --dur-base:  400ms;
  --dur-long:  700ms;
  --dur-hero:  1200ms;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);

  /* ── Layout ── */
  --max-w:     1280px;
  --max-w-md:  860px;
  --max-w-sm:  640px;
  --header-h:  80px;
}

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

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

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

body {
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-light);
  line-height: var(--lh-base);
  color: var(--c-text-light);
  background-color: var(--c-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

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

input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  width: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-serif);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }

p { font-size: var(--fs-base); line-height: var(--lh-relaxed); }

/* ── Typography utilities ── */
.vlx-hero-title {
  font-family: var(--f-serif);
  font-size: var(--fs-hero);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.vlx-hero-title em {
  font-style: italic;
  font-weight: var(--fw-regular);
  color: var(--c-gold);
}

.vlx-h1 { font-family: var(--f-serif); font-size: var(--fs-3xl); font-weight: var(--fw-semi); line-height: var(--lh-tight); }
.vlx-h2 { font-family: var(--f-serif); font-size: var(--fs-2xl); font-weight: var(--fw-semi); line-height: var(--lh-snug);  }
.vlx-h3 { font-family: var(--f-serif); font-size: var(--fs-xl);  font-weight: var(--fw-semi); line-height: var(--lh-snug);  }
.vlx-h4 { font-family: var(--f-serif); font-size: var(--fs-lg);  font-weight: var(--fw-semi); }

.vlx-overline {
  font-family: var(--f-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-gold);
  display: block;
}

.vlx-lead {
  font-size: var(--fs-md);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
}

.vlx-caption {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

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

.vlx-serif { font-family: var(--f-serif); }
.vlx-italic { font-style: italic; }
.vlx-gold   { color: var(--c-gold); }

/* ── Gold rule ── */
.vlx-rule {
  border: none;
  height: 1px;
  background: var(--c-gold);
  width: var(--sp-12);
  margin: var(--sp-6) 0;
}

.vlx-rule--center { margin-left: auto; margin-right: auto; }

/* ================================================================
   LAYOUT
   ================================================================ */

.vlx-container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-8);
  padding-right: var(--sp-8);
}

.vlx-container--md {
  max-width: var(--max-w-md);
}

.vlx-container--sm {
  max-width: var(--max-w-sm);
}

.vlx-container--full {
  max-width: 100%;
  padding: 0;
}

/* Sections */
.vlx-section {
  padding-top: var(--sp-24);
  padding-bottom: var(--sp-24);
}

.vlx-section--sm {
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-16);
}

.vlx-section--lg {
  padding-top: var(--sp-32);
  padding-bottom: var(--sp-32);
}

/* Section themes */
.vlx-section--dark  { background: var(--c-dark);  color: var(--c-text-dark); }
.vlx-section--ivory { background: var(--c-ivory); color: var(--c-text-light); }
.vlx-section--warm  { background: var(--c-warm);  color: var(--c-text-light); }

/* Grids */
.vlx-grid--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.vlx-grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.vlx-grid--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-8); }
.vlx-grid--2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-10); }
.vlx-grid--1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--sp-10); }

/* Flex helpers */
.vlx-flex         { display: flex; }
.vlx-flex--center { display: flex; align-items: center; justify-content: center; }
.vlx-flex--between{ display: flex; align-items: center; justify-content: space-between; }

/* ── Scroll reveal base state ── */
.vlx-reveal {
  opacity: 1;
  transform: none;
}

.vlx-js.vlx-animate .vlx-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-long) var(--ease-out),
              transform var(--dur-long) var(--ease-out);
}

.vlx-js.vlx-animate .vlx-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.vlx-reveal--delay-1 { transition-delay: 100ms; }
.vlx-reveal--delay-2 { transition-delay: 200ms; }
.vlx-reveal--delay-3 { transition-delay: 300ms; }
.vlx-reveal--delay-4 { transition-delay: 400ms; }

/* ── Image placeholder ── */
.vlx-placeholder {
  background: var(--c-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-muted-dark);
  border: 1px dashed var(--c-border-dark);
  width: 100%;
}

.vlx-placeholder--16-9  { aspect-ratio: 16 / 9; }
.vlx-placeholder--4-3   { aspect-ratio: 4 / 3; }
.vlx-placeholder--1-1   { aspect-ratio: 1 / 1; }
.vlx-placeholder--3-4   { aspect-ratio: 3 / 4; }

/* ── Main content wrapper ── */
.vlx-main { min-height: 60vh; }

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

@media (max-width: 1024px) {
  .vlx-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .vlx-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .vlx-grid--2-1,
  .vlx-grid--1-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --sp-24: 4rem;
    --sp-32: 6rem;
    --fs-3xl: 2.25rem;
    --fs-2xl: 1.75rem;
    --fs-hero: clamp(2.5rem, 11vw, 3.25rem);
    --header-h: 64px;
  }
  .vlx-container { padding-left: var(--sp-6); padding-right: var(--sp-6); }
  .vlx-grid--2,
  .vlx-grid--3,
  .vlx-grid--4 { grid-template-columns: 1fr; }
  .vlx-section { padding-top: var(--sp-16); padding-bottom: var(--sp-16); }
}
