/* Premium enhancements: ritocchi visivi per look “luxury” coerente e stabile */

/* Palette e rendering tipografico */
html.theme-premium {
  color-scheme: dark;
  --accent: #9b87f5;      /* violet premium */
  --accent-2: #60a5fa;    /* blue soft */
}
html.theme-premium, html.theme-premium body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* Background e colore testo base */
html.theme-premium body {
  background:
    radial-gradient(1200px 640px at 10% -10%, rgba(88,28,135,0.18), transparent 60%),
    radial-gradient(1000px 520px at 110% 10%, rgba(37,99,235,0.16), transparent 55%),
  linear-gradient(180deg, rgba(2,6,23,0.75), rgba(2,6,23,0.0) 40%),
  #121212 !important;
  color: #f1f5f9;
}

/* Tipografia display premium (H1/H2 in Playfair) */
html.theme-premium h1,
html.theme-premium h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -0.6px;
}
/* Heading secondari più densi ma sobri */
html.theme-premium h3,
html.theme-premium h4,
html.theme-premium h5,
html.theme-premium h6 {
  letter-spacing: -0.2px;
}

/* Hero pre-hydration più elegante e leggibile subito */
.pre-hydration-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-variant-ligatures: common-ligatures;
  font-feature-settings: 'liga' 1, 'kern' 1;
  letter-spacing: -0.8px;
  font-size: clamp(2.125rem, 4.6vw, 3.25rem);
  line-height: 1.05;
  color: #f8fafc;
  text-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 28px rgba(2,6,23,0.35);
}
.pre-hydration-hero p {
  opacity: 0.92;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
}

/* Nascondi il placeholder una volta montata l'app */
html[data-app-mounted="true"] .pre-hydration-hero,
body[data-app-mounted="true"] .pre-hydration-hero,
#root[data-app-mounted="true"] .pre-hydration-hero,
[data-root][data-app-mounted="true"] .pre-hydration-hero {
  display: none !important;
}

/* Card glassmorphism coerente e più pulito */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0))
              , rgba(13,17,23,0.82);
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: 0 10px 32px rgba(2,6,23,0.38), 0 0 24px rgba(139,92,246,0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
html.theme-premium .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 42px rgba(2,6,23,0.45), 0 0 30px rgba(139,92,246,0.4);
  border-color: rgba(148,163,184,0.26);
}

/* Pulsanti premium */
button {
  border-radius: 18px;
  font-weight: 600;
}
button.primary,
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #ffffff;
  border: 0;
  box-shadow: 0 10px 30px rgba(155,135,245,0.35), 0 2px 10px rgba(2,6,23,0.35);
  transition: box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}
button.primary:hover,
.btn-primary:hover {
  opacity: 0.96;
  transform: translateY(-0.5px);
  box-shadow: 0 14px 36px rgba(155,135,245,0.44), 0 3px 12px rgba(2,6,23,0.38);
}
button.primary:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white 30%);
  outline-offset: 2px;
}

/* Link eleganti (non bottoni) */
html.theme-premium a:not([class*="btn"]) {
  color: var(--accent-2);
  text-underline-offset: 3px;
}

/* Micro-tuning generale delle heading */
html.theme-premium h1, html.theme-premium h2, html.theme-premium h3,
html.theme-premium h4, html.theme-premium h5, html.theme-premium h6 {
  --stroke: rgba(15,23,42,0.12);
}

/* Mobile finetuning */
@media (max-width: 480px) {
  .pre-hydration-hero h1 { font-size: clamp(1.9rem, 7vw, 2.35rem); }
}
