/* ============================================================
   MR JINN — ENHANCE LAYER (V2)
   Eleva il design esistente mantenendone l'identita:
   nero + oro caldo + Inter, editoriale. Caricato DOPO site.css.
   Tutto additivo: profondita, gerarchia, micro-interazioni.
   Direzione da ui-ux-pro-max (depth layering, hierarchy, states).
   ============================================================ */

:root {
  --gold-grad: linear-gradient(120deg, #efe9dd 0%, #e3c489 45%, #c79a55 100%);
  --glow-gold: rgba(199, 154, 85, 0.16);
}

/* ---------- 1. Profondita ambientale (il nero piatto diventa atmosfera) ---------- */
body {
  background:
    radial-gradient(125% 85% at 50% -12%, rgba(199, 154, 85, 0.09), transparent 58%),
    radial-gradient(70% 55% at 100% 22%, rgba(199, 154, 85, 0.05), transparent 55%),
    radial-gradient(60% 50% at 0% 78%, rgba(199, 154, 85, 0.04), transparent 55%),
    #000000;
  background-attachment: fixed;
}

/* Hairline d'oro tenue in cima a ogni sezione editoriale */
.rule {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(199, 154, 85, 0.30), transparent);
}

/* ---------- 2. Eyebrow + indici: piu editoriali ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 1px;
  background: linear-gradient(to right, var(--gold-bright), transparent);
}
.page-hero .eyebrow::before,
.hero-copy .eyebrow::before { width: 2.2em; }

.section-index {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}

/* ---------- 3. Heading: micro-rifinitura ---------- */
.display-xl, .display-lg { letter-spacing: -0.018em; }
.statement { letter-spacing: -0.01em; }

/* ---------- 4. Stats: piu grandi, oro, divisori, underline animata ---------- */
.stats-grid {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  gap: 0;
  border-top: 1px solid var(--line);
}
.stat {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.4rem, 2.5vw, 2.2rem);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 721px) {
  .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .stat { border-bottom: 0; border-left: 1px solid var(--line); }
  .stat:first-child { border-left: 0; }
}
.stat::after {
  content: "";
  position: absolute;
  left: clamp(1.4rem, 2.5vw, 2.2rem);
  bottom: -1px;
  height: 2px; width: 0;
  background: var(--gold-grad);
  transition: width 1s var(--ease) 0.2s;
}
.is-visible .stat::after, .reveal-stagger.is-visible .stat::after { width: 42px; }
.stat-number {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  display: inline-block;
}
.stat-suffix { font-size: 0.5em; }
.stat-label { display: block; margin-top: 1rem; color: var(--text-body); font-size: 0.96rem; max-width: 30ch; }

/* ---------- 5. Pillars: accento oro all'hover + numero in gradiente ---------- */
.pillar { position: relative; overflow: hidden; }
.pillar::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--gold-grad);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s var(--ease);
}
.pillar:hover { background: #0c0b09; }
.pillar:hover::before { transform: scaleY(1); }
.pillar-num {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- 6. Project cards: piu ricche, glow oro, zoom immagine ---------- */
.card {
  border-radius: 6px;
  transition: border-color 0.45s var(--ease), transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.card:hover {
  border-color: rgba(199, 154, 85, 0.45);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(199,154,85,0.12), 0 0 40px -12px var(--glow-gold);
  transform: translateY(-6px);
}
.card-media { border-radius: 6px 6px 0 0; }
.card-media::after {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 45%);
}
.card-media img { transition: transform 1.1s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-status {
  align-self: flex-start;
  border: 1px solid rgba(199,154,85,0.32);
  border-radius: 100px;
  padding: 0.28rem 0.7rem;
  color: var(--gold-bright);
}
.card h3 { transition: color 0.35s var(--ease); }
.card:hover h3 { color: #fff; }
.card-meta.gold {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: normal; font-weight: 500; font-size: 0.92rem;
}

/* ---------- 7. Buttons: sweep oro all'hover + freccia che scorre ---------- */
.btn {
  position: relative;
  overflow: hidden;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn .arrow { display: inline-block; transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--solid:hover { box-shadow: 0 0 36px -8px var(--glow-gold); }

/* ---------- 8. Portrait: cornice oro tenue + profondita ---------- */
.portrait { position: relative; border-radius: 8px; overflow: hidden; }
.portrait img { border-radius: 8px; transition: transform 1.2s var(--ease); }
.portrait::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(199,154,85,0.20), inset 0 -120px 120px -90px rgba(0,0,0,0.8);
}
.portrait:hover img { transform: scale(1.03); }

/* ---------- 9. Newsletter / form: bordo gradiente + focus oro ---------- */
.newsletter-box {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(199,154,85,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
}
.newsletter-box::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(199,154,85,0.4), transparent 40%, transparent 60%, rgba(199,154,85,0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: rgba(199,154,85,0.55) !important;
  box-shadow: 0 0 0 3px rgba(199,154,85,0.12);
}

/* ---------- 10. Scrollbar + selezione coerenti oro ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#c79a55, #4a391f);
  border-radius: 100px; border: 2px solid #000;
}

/* ---------- 11. Reveal: easing un filo piu morbido (additivo) ---------- */
.reveal, .reveal-stagger > * { transition-timing-function: var(--ease); }

/* ---------- 12. RTL (arabo): accenti direzionali sul lato giusto ---------- */
[dir="rtl"] .eyebrow::before {
  background: linear-gradient(to left, var(--gold-bright), transparent);
}
[dir="rtl"] .pillar::before { left: auto; right: 0; }
[dir="rtl"] .stat::after {
  left: auto;
  right: clamp(1.4rem, 2.5vw, 2.2rem);
}
@media (min-width: 721px) {
  [dir="rtl"] .stat { border-left: 0; border-right: 1px solid var(--line); }
  [dir="rtl"] .stat:first-child { border-right: 0; }
}
[dir="rtl"] .btn:hover .arrow { transform: translateX(-5px); }
