/* ============================================================
   HXGW SRLS — style.css
   Tema dark futuristico · accenti brand: #FFC900 / #08BAB5 / #43E004
   ============================================================ */

:root {
  --bg: #07090d;
  --bg-2: #0b0e14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e6e8eb;
  --muted: #9aa3af;
  --yellow: #ffc900;
  --teal: #08bab5;
  --green: #43e004;
  --radius: 18px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: #111; }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }

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

/* ---------- sfondo animato globale ---------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(255, 201, 0, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(8, 186, 181, 0.06), transparent 60%),
    radial-gradient(700px 500px at 70% 110%, rgba(67, 224, 4, 0.05), transparent 60%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(7, 9, 13, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: min(1180px, 92%); margin-inline: auto; }
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--muted);
  position: relative; transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--yellow); transition: width 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--yellow); color: var(--yellow) !important;
  padding: 8px 18px; border-radius: 999px; font-weight: 600;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.nav-cta:hover { background: var(--yellow); color: #111 !important; box-shadow: 0 0 24px rgba(255, 201, 0, 0.4); }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 110;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 5px 0; transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 48px) 0 64px;
}
.hero-inner { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--yellow); }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(92deg, var(--yellow), #ffe066 45%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 56ch; margin-top: 22px; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 28px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.98rem;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-primary { background: var(--yellow); color: #111; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255, 201, 0, 0.45); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.25); background: var(--surface-2); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 64px; }
.hero-stats .stat b { font-family: var(--font-head); font-size: 1.6rem; color: var(--text); display: block; }
.hero-stats .stat span { font-size: 0.85rem; color: var(--muted); }

.hero-mark {
  position: absolute; right: -4%; top: 50%;
  width: clamp(280px, 38vw, 560px);
  transform: translateY(-50%);
  opacity: 0.16;
  z-index: 1;
  animation: floatMark 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes floatMark {
  0%, 100% { transform: translateY(-52%) rotate(-2deg); }
  50% { transform: translateY(-46%) rotate(2deg); }
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  color: var(--muted); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 36px;
  background: linear-gradient(var(--yellow), transparent);
  animation: dropline 1.8s ease-in-out infinite;
}
@keyframes dropline { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- sezioni ---------- */
.section { padding: 110px 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 14px; }

.accent-teal .eyebrow { color: var(--teal); }
.accent-teal .eyebrow::before { background: var(--teal); }
.accent-green .eyebrow { color: var(--green); }
.accent-green .eyebrow::before { background: var(--green); }

/* ---------- card servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s, background 0.35s;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(255, 201, 0, 0.1), transparent 65%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.card:hover { transform: translateY(-8px); border-color: rgba(255, 201, 0, 0.35); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255, 201, 0, 0.1);
  border: 1px solid rgba(255, 201, 0, 0.25);
  margin-bottom: 24px;
}
.card-icon svg { width: 28px; height: 28px; stroke: var(--yellow); }
.card h3 { font-size: 1.3rem; margin-bottom: 14px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- pannelli progetti (Nautica / Compliance) ---------- */
.project {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  padding: 56px;
  position: relative; overflow: hidden;
}
.project.reverse { direction: rtl; }
.project.reverse > * { direction: ltr; }
.project-logo img { width: min(420px, 100%); height: auto; }
.project h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.project p { color: var(--muted); }
.project-features { display: grid; gap: 14px; margin-top: 26px; list-style: none; }
.project-features li {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  font-size: 0.95rem;
}
.project-features li svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
.project-glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(120px); opacity: 0.16; pointer-events: none; }
.project-nautica .project-glow { background: var(--teal); top: -180px; right: -120px; }
.project-nautica .project-features li svg { stroke: var(--teal); }
.project-nautica:hover { border-color: rgba(8, 186, 181, 0.4); }
.project-compliance .project-glow { background: var(--green); bottom: -180px; left: -120px; }
.project-compliance .project-features li svg { stroke: var(--green); }
.project-compliance:hover { border-color: rgba(67, 224, 4, 0.35); }

.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.tag-teal { color: var(--teal); border: 1px solid rgba(8, 186, 181, 0.45); background: rgba(8, 186, 181, 0.08); }
.tag-green { color: var(--green); border: 1px solid rgba(67, 224, 4, 0.4); background: rgba(67, 224, 4, 0.07); }

/* ---------- collaborazioni ---------- */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.partner-tile {
  height: 130px; border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: transparent;
  display: grid; place-items: center;
  padding: 26px 32px;
  transition: transform 0.3s, border-color 0.3s;
}
.partner-tile:hover { transform: translateY(-5px); border-color: rgba(255, 201, 0, 0.55); }
.partner-tile img { max-height: 60px; max-width: 100%; width: auto; object-fit: contain; }
.partner-tile.noimg::after {
  content: attr(data-name);
  color: var(--muted); font-family: var(--font-head); font-weight: 600;
  font-size: 1.05rem; letter-spacing: 0.04em;
}

/* ---------- CTA banda ---------- */
.cta-band {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(600px 300px at 50% -40%, rgba(255, 201, 0, 0.12), transparent 70%),
    var(--surface);
  padding: 72px 32px;
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 32px; }

/* ---------- footer ---------- */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(rgba(255,255,255,0.02), transparent);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px;
}
.footer-brand img { height: 38px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 30ch; }
.footer h4 {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 18px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer li, .footer address { font-style: normal; color: var(--muted); font-size: 0.92rem; }
.footer a:hover { color: var(--text); }
.footer-social { display: flex; gap: 14px; margin-top: 20px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.footer-social a:hover { transform: translateY(-3px); border-color: var(--yellow); box-shadow: 0 6px 20px rgba(255, 201, 0, 0.25); }
.footer-social svg { width: 18px; height: 18px; fill: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.82rem;
}
.footer-bottom nav { display: flex; gap: 22px; }

/* ---------- pagine interne (privacy / politica) ---------- */
.page-hero { padding: calc(var(--nav-h) + 72px) 0 48px; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 22ch; }
.page-hero .sub { color: var(--muted); margin-top: 14px; max-width: 70ch; }

.prose {
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(28px, 5vw, 56px);
  margin-bottom: 96px;
}
.prose h2 {
  font-size: 1.25rem; margin: 40px 0 14px;
  padding-top: 28px; border-top: 1px solid var(--border);
  display: flex; gap: 14px; align-items: baseline;
}
.prose h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 .n { color: var(--yellow); font-size: 0.95rem; font-family: var(--font-head); }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose strong { color: var(--text); }
.prose ul { color: var(--muted); margin: 0 0 14px 22px; }
.prose ul li { margin-bottom: 8px; }
.prose a { color: var(--yellow); }
.prose a:hover { text-decoration: underline; }
.prose .revision { margin-top: 36px; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 20px; }

.prose table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 0.92rem; }
.prose th {
  text-align: left; font-family: var(--font-head); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow);
  padding: 12px 14px; border-bottom: 1px solid rgba(255, 201, 0, 0.35);
}
.prose td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.prose tr:hover td { background: rgba(255,255,255,0.025); }

/* ---------- viewer PDF ---------- */
.pdf-shell {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 96px;
}
.pdf-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--muted);
}
.pdf-frame { width: 100%; height: min(78vh, 980px); border: 0; display: block; background: #14161c; }
.pdf-fallback { padding: 64px 32px; text-align: center; color: var(--muted); }
.pdf-fallback .btn { margin-top: 22px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr; }
  .project, .project.reverse { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .hero-mark { opacity: 0.08; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100;
    background: #07090d;
    flex-direction: column; justify-content: center; gap: 30px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }
  .nav-links.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links a { font-size: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .partners { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .section { padding: 80px 0; }
}
