/* ============================================
   NAMI SRL — Dark Premium Theme
   ============================================ */
:root {
  --bg: #05070d;
  --bg-2: #0a0e18;
  --bg-3: #0f1524;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --gold: #c9a24b;
  --gold-light: #e6c87a;
  --blue: #4cc3ff;
  --text: #eef1f6;
  --text-dim: #9aa3b5;
  --radius: 18px;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; }

.container { width: min(1180px, 92%); margin-inline: auto; }

::selection { background: var(--gold); color: #000; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: box-shadow .4s;
}
/* Blur su pseudo-elemento: evita che backdrop-filter diventi
   containing block del menu mobile position:fixed (bug iOS Safari) */
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0; transition: opacity .4s;
}
.nav.scrolled::before { opacity: 1; }
.nav.scrolled { box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  letter-spacing: .12em;
}
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: .92rem; color: var(--text-dim); letter-spacing: .02em;
  transition: color .3s;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-cta {
  padding: 10px 22px; border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold-light) !important; transition: background .3s, color .3s;
}
.nav-cta:hover { background: var(--gold); color: #000 !important; }
.burger { display: none; position: relative; background: none; border: 0; cursor: pointer; z-index: 110; }
.burger span {
  display: block; width: 26px; height: 2px; background: var(--text);
  margin: 6px 0; transition: transform .3s, opacity .3s;
}
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(5,7,13,.25), rgba(5,7,13,.88) 75%),
    linear-gradient(180deg, rgba(5,7,13,.55), rgba(5,7,13,.35) 50%, var(--bg) 98%);
}
.hero-content { position: relative; z-index: 2; padding-top: 90px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .82rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 26px;
}
.hero-eyebrow::before { content: ''; width: 42px; height: 1px; background: var(--gold); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700;
  max-width: 15ch; margin-bottom: 26px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold-light), var(--gold) 55%, var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 52ch; color: var(--text-dim); font-size: 1.12rem; margin-bottom: 42px; }
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 34px; border-radius: 999px; font-weight: 600;
  font-size: .95rem; letter-spacing: .02em; transition: transform .3s, box-shadow .3s, background .3s;
}
.btn-gold {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  color: #06070c;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(201,162,75,.35); }
.btn-ghost { border: 1px solid rgba(255,255,255,.25); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 44px; border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 999px;
}
.scroll-hint::after {
  content: ''; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 4px; background: var(--gold);
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% {opacity:0; transform:translateY(0);} 30% {opacity:1;} 100% {opacity:0; transform:translateY(16px);} }

/* ---------- Sections ---------- */
section { padding: 110px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  font-size: .78rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; display: block;
}
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 18px; }
.section-head p { color: var(--text-dim); }

/* ---------- Stats ---------- */
.stats { padding: 70px 0; border-block: 1px solid rgba(255,255,255,.06); background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat h3 { font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--gold-light); }
.stat p { color: var(--text-dim); font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Services ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.service-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--card-border); background: var(--card);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .45s, box-shadow .45s;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201,162,75,.45);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.service-media { position: relative; aspect-ratio: 16/9.5; overflow: hidden; }
.service-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.service-card:hover .service-media img { transform: scale(1.07); }
.service-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,7,13,.92));
}
.service-body { padding: 26px 28px 30px; }
.service-body h3 { font-size: 1.28rem; margin-bottom: 10px; }
.service-body p { color: var(--text-dim); font-size: .95rem; margin-bottom: 18px; }
.service-link {
  font-size: .88rem; font-weight: 600; letter-spacing: .04em;
  color: var(--gold-light); display: inline-flex; align-items: center; gap: 8px;
}
.service-link svg { transition: transform .3s; }
.service-card:hover .service-link svg { transform: translateX(5px); }

/* ---------- ESG banner ---------- */
.esg {
  border-radius: calc(var(--radius) + 8px); overflow: hidden; position: relative;
  min-height: 420px; display: flex; align-items: center;
}
.esg-bg { position: absolute; inset: 0; }
.esg-bg img { width: 100%; height: 100%; object-fit: cover; }
.esg-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(5,7,13,.94) 25%, rgba(5,7,13,.45) 70%, rgba(5,7,13,.2));
}
.esg-content { position: relative; z-index: 2; padding: 70px clamp(28px, 6vw, 80px); max-width: 620px; }
.esg-content h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 18px; }
.esg-content p { color: var(--text-dim); margin-bottom: 30px; }

/* ---------- Eventi ---------- */
.events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.event-card {
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--card-border); background: var(--card);
  border-radius: var(--radius); padding: 34px 36px;
  transition: border-color .4s, transform .4s;
}
.event-card:hover { border-color: rgba(76,195,255,.4); transform: translateY(-6px); }
.event-tag {
  align-self: flex-start; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue); border: 1px solid rgba(76,195,255,.35);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.event-card h3 { font-size: 1.4rem; }
.event-meta { color: var(--text-dim); font-size: .92rem; }

/* ---------- Chi siamo / Brand ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: center; }
.about-text p { color: var(--text-dim); margin-bottom: 20px; }
.brand-cards { display: grid; gap: 20px; }
.brand-card {
  border: 1px solid var(--card-border); background: var(--card);
  border-radius: var(--radius); padding: 28px 30px;
  transition: border-color .4s;
}
.brand-card:hover { border-color: rgba(201,162,75,.4); }
.brand-card h4 { color: var(--gold-light); margin-bottom: 8px; font-size: 1.1rem; }
.brand-card p { color: var(--text-dim); font-size: .92rem; }

/* ---------- CTA ---------- */
.cta {
  text-align: center; background:
    radial-gradient(ellipse at 50% 120%, rgba(201,162,75,.16), transparent 60%),
    var(--bg-2);
  border-block: 1px solid rgba(255,255,255,.06);
}
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 20ch; margin: 0 auto 20px; }
.cta p { color: var(--text-dim); margin-bottom: 38px; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.contact-card {
  border: 1px solid var(--card-border); background: var(--card);
  border-radius: var(--radius); padding: 30px 32px;
}
.contact-card h4 {
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.contact-card p, .contact-card a { color: var(--text-dim); font-size: .98rem; }
.contact-card a:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
footer {
  padding: 60px 0 40px; border-top: 1px solid rgba(255,255,255,.06);
  background: var(--bg-2);
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  color: var(--text-dim); font-size: .88rem;
}
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--gold-light); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

/* ---------- Service subpage ---------- */
.page-hero {
  position: relative; min-height: 62vh; display: flex; align-items: flex-end;
  overflow: hidden; padding-bottom: 70px;
}
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,7,13,.6), rgba(5,7,13,.35) 45%, var(--bg));
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 16ch; margin-bottom: 14px; }
.page-hero p { color: var(--text-dim); max-width: 56ch; font-size: 1.08rem; }
.breadcrumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 22px; display: block; }
.breadcrumb a { color: var(--gold-light); }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature {
  border: 1px solid var(--card-border); background: var(--card);
  border-radius: var(--radius); padding: 30px 32px;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 10px; color: var(--gold-light); }
.feature p { color: var(--text-dim); font-size: .95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center;
    background: rgba(5,7,13,.97); backdrop-filter: blur(12px);
    transform: translateY(-100%); visibility: hidden;
    transition: transform .45s cubic-bezier(.2,.7,.2,1), visibility 0s .45s;
  }
  .nav-links.open {
    transform: none; visibility: visible;
    transition: transform .45s cubic-bezier(.2,.7,.2,1);
  }
  .nav-links a { font-size: 1.2rem; }
  .burger { display: block; }
  .services-grid, .events-grid, .features-grid, .contact-grid { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
}
