html, body {
  overflow-x: hidden;
  overflow-y: auto;
}


body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #111111;
}

header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e5e5;
}

nav a {
  color: #111111;
  margin-left: 24px;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover {
  text-decoration: underline;
}

section {
  padding: 72px 32px;
  max-width: 1100px;
  margin: auto;
}

h1 {
  font-weight: 400;
  font-size: 36px;
  margin-bottom: 24px;
}

h2 {
  font-weight: 400;
  font-size: 24px;
  margin-top: 48px;
}

p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 720px;
}

.footer {
  padding: 32px;
  text-align: center;
  font-size: 12px;
  color: #666666;
  border-top: 1px solid #e5e5e5;
}


/* HERO VIDEO */
.hero-video {
  position: relative;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}

.hero-video .hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 72px 32px;
  max-width: 1100px;
  margin: 0 auto;
  color: #fff;
}

.hero-video .hero-content h1,
.hero-video .hero-content p {
  color: #fff;
  max-width: 820px;
}

/* HEADER OVER VIDEO */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255,255,255,0);
  border-bottom: 1px solid rgba(229,229,229,0);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

/* Ensure the mobile toggle stays clickable above media. */
header.site-header .nav-toggle {
  position: relative;
  z-index: 1000;
}
header.site-header{position:fixed;}


header.site-header.scrolled {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(229,229,229,1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

header.site-header a {
  transition: color .2s ease;
}

header.site-header:not(.scrolled) nav a {
  color: #ffffff;
}

header.site-header.scrolled nav a {
  color: #111111;
}

/* Desktop and non-home behavior: the header must be solid, even if JS is disabled. */
body:not(.home) header.site-header {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(229,229,229,1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
body:not(.home) header.site-header nav a {
  color: #111111;
}
body:not(.home) header.site-header .logo-light {
  display: none;
}
body:not(.home) header.site-header .logo-dark {
  display: inline-block;
}

/* Home: when transparent (top of the page), no separator line should be visible. */
body.home header.site-header:not(.scrolled) {
  box-shadow: none;
  border-bottom-color: rgba(229,229,229,0);
}

/* The mobile overlay container is in the markup, but it must never render on desktop. */
.mobile-nav-overlay {
  display: none;
}

header.site-header:not(.scrolled) .logo-dark { display: none; }
header.site-header:not(.scrolled) .logo-light { display: inline-block; }
header.site-header.scrolled .logo-dark { display: inline-block; }
header.site-header.scrolled .logo-light { display: none; }

/* Space helper if needed */
.page-top-spacer { height: 92px; }


/* HOME QUOTE */
.quote-block {
  padding: 56px 32px;
  text-align: center;
}

.quote-block blockquote {
  margin: 0 auto;
  max-width: 820px;
  font-size: 20px;
  line-height: 1.55;
  color: #111111;
}

.quote-block .attrib {
  margin-top: 14px;
  font-size: 13px;
  color: #666666;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid #e5e5e5;
  padding: 28px 32px;
  color: #666666;
  font-size: 12px;
  text-align: center;
}

.site-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer .footer-links {
  margin-top: 10px;
}

.site-footer a {
  color: #666666;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .sep {
  margin: 0 10px;
  color: #999999;
}

/* Fixed header spacing helper */
.content-after-header {
  padding-top: 110px;
}



:root {
  --brand-red: #e21e24;
}

/* HERO: center the title */
.hero-video .hero-content {
  text-align: center;
  width: 100%;
  justify-content: flex-end;
}

.hero-video .hero-content > div {
  width: 100%;
}

/* Quote typography */
.quote-block blockquote {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
}

/* Two-column editorial layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  align-items: start;
}

.col-block {
  border-left: 3px solid var(--brand-red);
  padding-left: 16px;
}

.col-block h2, .col-block h3 {
  margin-top: 0;
}

.single-col {
  margin-top: 18px;
}

@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}


/* Contacts block */
.single-col {
  max-width: 720px;
  margin: 48px auto 0 auto;
  text-align: center;
}

.single-col .col-block {
  border-left: 3px solid var(--brand-red);
  padding-left: 16px;
  display: inline-block;
  text-align: left;
}


/* Heading icons */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title img {
  height: 34px;
  width: auto;
  display: inline-block;
}


/* Global text justification */
p {
  text-align: justify;
  hyphens: none;
}


/* Single column helper (for inner pages like demos) */
.single-col {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}
.small-note {
  font-size: 0.95em;
  opacity: 0.85;
}


/* Voice & Dreams demos page */
.demos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .demos-grid { grid-template-columns: 1fr; }
}
.demo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.demo-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.demo-list li:last-child { border-bottom: none; }
.link-clean a,
a.link-clean {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.25);
}
.link-clean a:hover,
a.link-clean:hover {
  border-bottom-color: rgba(0,0,0,0.6);
}
.back-link {
  text-align: center;
  margin-top: 10px;
}


/* Discreet button (used for back navigation) */
.btn-ghost {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: rgba(0,0,0,0.02);
}
.btn-ghost:hover {
  border-color: rgba(0,0,0,0.45);
  background: rgba(0,0,0,0.04);
}

/* Contatti: mappa */
.map-embed{
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.map-embed iframe{
  display:block;
  width:100%;
  height:280px;
  border:0;
}
.map-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

/* Minimal back button */
.btn-back-minimal {
  display: inline-block;
  padding: 4px 0;
  font-size: 0.9rem;
  text-decoration: none;
  color: inherit;
}

/* True minimal back button */
.btn-back {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none !important;
  border-radius: 6px;
  background: rgba(0,0,0,0.04);
  text-decoration: none !important;
  color: inherit;
}
.btn-back:hover {
  background: rgba(0,0,0,0.08);
}

/* Ensure no typographic left border on back navigation */
.back-link {
  border-left: none !important;
  padding-left: 0 !important;
}


/* Remove left rule for specific blocks (e.g., back button area) */
.col-block.no-rule {
  border-left: none !important;
  padding-left: 0 !important;
}


/* Embedded audio block inside references page */
.audio-embed-block {
  margin: 8px 0 2px;
}
.audio-embed-title {
  margin-bottom: 10px;
}
.embed-audio iframe {
  border: 0;
  border-radius: 8px;
}
.audio-embed-note {
  margin-top: 6px;
  font-size: 0.85rem;
}


/* 2Stream video blocks */
.video-intro iframe,
.embed-video iframe {
  border: 0;
  border-radius: 8px;
}
.video-note {
  margin-top: 8px;
  font-size: 0.9rem;
}
.video-refs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 18px;
}
@media (max-width: 860px) {
  .video-refs { grid-template-columns: 1fr; }
}
.video-ref-title {
  margin-bottom: 10px;
}


/* Contact form (minimal, elegant) */
.contact-form {
  max-width: 420px;
}
.contact-form p {
  margin: 0 0 12px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  background: #fff;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(0,0,0,0.45);
}
.contact-form button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.contact-form button:hover {
  background: #000;
}
.contact-form button:active {
  transform: translateY(1px);
}
.contact-form ::placeholder {
  color: rgba(0,0,0,0.45);
}


/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 18px 0 26px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer-links {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.4;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-sep {
  margin: 0 8px;
}
@media (max-width: 520px) {
  .footer-sep { display: none; }
  .footer-links span, .footer-links a { display: inline-block; margin: 4px 6px; }
}


/* Footer dark theme */
.site-footer {
  background: #1e1e1e;
  color: #ffffff;
}
.site-footer a {
  color: #ffffff;
}
.site-footer a:hover {
  opacity: 0.8;
}


/* Policy pages */
main h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.05rem;
}
main p + h3 {
  margin-top: 22px;
}


/* RESPONSIVE + MOBILE NAV */
@media (max-width: 860px) {
  @media (max-width: 860px) {
  }

}


nav.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
}

nav.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav.site-nav .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.75);
  color: #111;
  font-size: 14px;
  line-height: 1;
}

header.site-header:not(.scrolled) nav.site-nav .nav-toggle {
  border-color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: start;
}

/* Default content padding on small screens */
@media (max-width: 980px) {
  header { padding: 16px 16px; }
}

@media (max-width: 860px) {
  nav.site-nav .nav-toggle { display: inline-flex; }

  nav.site-nav .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.88);
  }

  header.site-header.scrolled nav.site-nav .nav-links {
    background: rgba(255,255,255,0.98);
  }

  nav.site-nav.open .nav-links { display: flex; }

  nav.site-nav .nav-links a {
    padding: 12px 12px;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.14);
  }

  header.site-header.scrolled nav.site-nav .nav-links a {
    border-bottom-color: rgba(0,0,0,0.10);
  }

  /* Make two columns stack */
  .two-col { grid-template-columns: 1fr; gap: 28px; }

  /* Reduce big hero spacing */
  .hero-video { min-height: 420px; }
}

/* Improve readability on very small devices */
@media (max-width: 420px) {
  body { font-size: 15px; }
  h2 { font-size: 22px; }
}

/* ============================================================
   FINAL RESPONSIVE NAV + HOME HEADER BEHAVIOR (authoritative)
   These rules intentionally override earlier declarations.
============================================================ */

/* Header: fixed everywhere */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

/* Non-home pages: always opaque */
body:not(.home) .site-header {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 6px 22px rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* Home: overlays hero, starts transparent */
body.home .site-header {
  background: rgba(255,255,255,0);
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

/* Home: becomes readable on scroll */
body.home .site-header.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

/* Hamburger button visuals */
.nav-toggle {
  display: none;
  appearance: none;
  background: rgba(0,0,0,0.06);
  color: #111;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle .bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle .bars span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Mobile nav panel */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; }

	  nav.site-nav .nav-links {
    display: none;
    position: fixed;
	    top: var(--header-offset, 72px);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 0;
    background: rgba(255,255,255,0.98);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav.site-nav.open .nav-links { display: flex; }

  nav.site-nav .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 12px;
    font-size: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  nav.site-nav .nav-links a:last-child { border-bottom: 0; }
}



/* === Navigation rules: page-context first === */
.site-header { background: #ffffff; border-bottom: 0; }
.site-header .site-nav a { color: #000000; }

/* Home: header over video starts transparent with white links */
body.home .site-header { background: transparent; border-bottom: 0; }
body.home .site-header .site-nav a { color: #ffffff; }

/* Home: when scrolled, header becomes solid and links turn black, separator allowed */
body.home .site-header.scrolled { background: rgba(255,255,255,0.96); border-bottom: 1px solid rgba(0,0,0,0.12); }
body.home .site-header.scrolled .site-nav a { color: #000000; }

/* Never show a separator while transparent on Home */
body.home .site-header:not(.scrolled) { box-shadow: none; }

/* Mobile: hide desktop inline nav and use hamburger + overlay */
@media (max-width: 860px) {
  .site-nav { display: flex; align-items: center; justify-content: space-between; }
  .site-nav .nav-links { display: none !important; }
  .site-nav .nav-toggle { display: inline-flex !important; }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    z-index: 200;
    display: none;
    padding: 90px 24px 24px;
    overflow-y: auto;
  }
  .mobile-nav-overlay.open { display: block; }

  .mobile-nav-overlay a {
    display: block;
    padding: 10px 0;
    color: #000000;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.2;
  }
}
