/* Digital Foto Video — mobile first */
:root {
  /* Colori logo: navy banner, rosso cornice, blu tagline, cerchio azzurro chiaro */
  --logo-navy: #152a45;
  --logo-navy-deep: #0c1a2e;
  --logo-red: #e31926;
  --logo-blue: #2ea3f2;
  --logo-sky: #c5e5fb;

  --bg: var(--logo-navy-deep);
  --bg-elevated: var(--logo-navy);
  --surface: #1f3a5a;
  --text: #ffffff;
  --text-muted: #9eb9d9;
  --link: var(--logo-blue);
  --link-soft: rgba(46, 163, 242, 0.14);
  --accent: var(--logo-red);
  --accent-soft: rgba(227, 25, 38, 0.18);
  --accent-border: rgba(227, 25, 38, 0.52);
  --whatsapp: #25d366;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --space: clamp(1rem, 4vw, 2rem);
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: var(--space);
  top: var(--space);
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 1000;
}

/* Header — barra superiore (blur) separata dallo sticky così il menu fixed usa il viewport */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
}

.header-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  background: rgba(12, 26, 46, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-row {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space);
  min-height: var(--header-h);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

.header-shell {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  min-width: 0;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
  color: var(--link);
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu-state {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.site-header:has(#nav-menu-toggle:checked) .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header:has(#nav-menu-toggle:checked) .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header:has(#nav-menu-toggle:checked) .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

.site-nav {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--logo-navy-deep);
  padding: 0;
  padding-top: var(--header-h);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: none;
  box-sizing: border-box;
}

.site-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Wrapper: mobile = flex column fullscreen; desktop = contents (children lay out in .site-nav) */
.site-nav-sheet {
  display: contents;
}

.site-nav-home {
  display: none;
}

.site-nav-list a {
  display: block;
  padding: 0.85rem 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 500;
}

.site-nav-list a:hover,
.site-nav-list a:focus-visible {
  color: var(--link);
  text-decoration: none;
}

@media (max-width: 899px) {
  body:has(#nav-menu-toggle:checked) {
    overflow: hidden;
  }

  .brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(2, 8, 18, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
    pointer-events: none;
  }

  .site-header:has(#nav-menu-toggle:checked) .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 2;
    padding: 0;
    padding-top: var(--header-h);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    border-top: none;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .site-header:has(#nav-menu-toggle:checked) .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav-sheet {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space) max(1.25rem, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  .site-nav-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex: 1;
    min-height: 0;
    padding: clamp(1rem, 5vw, 2.5rem) 0;
    margin: 0;
    text-decoration: none;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
  }

  .site-nav-home:hover,
  .site-nav-home:focus-visible {
    text-decoration: none;
    color: var(--link);
  }

  .site-nav-home img {
    width: clamp(72px, 20vw, 104px);
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
  }

  .site-nav-home-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 4.5vw, 1.5rem);
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    max-width: 16em;
    text-wrap: balance;
  }

  .site-nav-list {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav-list > li {
    margin: 0;
  }

  .site-nav-list > li > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 3.25rem;
    padding: 0.85rem 0.35rem 0.85rem 0;
    margin: 0;
    font-size: clamp(1.05rem, 3.8vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav-list > li:last-child > a {
    border-bottom: none;
    padding-bottom: 0.35rem;
  }
}

@media (min-width: 900px) {
  .nav-backdrop {
    display: none !important;
  }

  .header-shell {
    flex: 0 1 auto;
    width: auto;
  }

  .header-inner {
    z-index: auto;
    width: auto;
    height: var(--header-h);
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    inset: auto;
    z-index: auto;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    padding: 0;
    min-height: 0;
    border: none;
    overflow: visible;
    background: transparent;
    transition: none;
  }

  .site-nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem 1.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav-list a {
    padding: 0.35rem 0;
    border: none;
  }
}

/* Hero — altezza viewport (sotto header) */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding: var(--space);
  padding-bottom: clamp(2rem, 8vw, 4rem);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    rgba(12, 26, 46, 0.88) 45%,
    rgba(12, 26, 46, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.hero .tagline {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  margin: 0 0 1.25rem;
  max-width: 42ch;
}

.tagline-line {
  display: block;
}

.tagline-line + .tagline-line {
  margin-top: 0.35rem;
}

.tagline-line--meta {
  color: var(--text);
  opacity: 0.92;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  border-color: var(--link);
  color: var(--link);
}

/* Sections */
.section {
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--space);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 60ch;
}

/* Offset scroll per header sticky (link nel menu) */
.section[id],
.service-card[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

@media (max-width: 899px) {
  .section[id],
  .service-card[id] {
    scroll-margin-top: calc(var(--header-h) + 1.35rem);
  }
}

/* Intro */
.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 700px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.intro-text p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.intro-text p:last-child {
  margin-bottom: 0;
}

.intro-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Services grid */
.services-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 520px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover,
.service-card:focus-visible {
  text-decoration: none;
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.service-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.service-card-body {
  padding: 1rem 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.service-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
}

.contact-fb {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  margin-top: 0.15rem;
}

.contact-fb:hover,
.contact-fb:focus-visible {
  color: var(--link);
  text-decoration: none;
}

.icon-facebook {
  flex-shrink: 0;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--link);
  text-decoration: none;
}

.footer-social:hover,
.footer-social:focus-visible {
  text-decoration: underline;
}

.dati-attivita {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Contatti & maps */
.two-col {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-list strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-phone-with-vcard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.contact-vcard {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--link);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.contact-vcard:hover,
.contact-vcard:focus-visible {
  text-decoration: underline;
}

.contact-vcard img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 240px;
  background: var(--surface);
}

.map-wrap iframe {
  width: 100%;
  height: min(320px, 50vh);
  border: 0;
  display: block;
}

@media (min-width: 768px) {
  .map-wrap iframe {
    height: 360px;
  }
}

/* Dati aziendali */
.dati-box {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.dati-box dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.dati-box dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0;
}

.dati-box dd {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* Powered by (sotto il footer) */
.powered {
  text-align: center;
  padding: 1rem var(--space);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg);
}

.powered-inner {
  margin: 0;
}

.powered-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.powered-link:hover,
.powered-link:focus-visible {
  color: var(--link);
  text-decoration: none;
}

.powered-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.powered-label {
  white-space: nowrap;
}

.powered-badge {
  display: block;
  width: auto;
  height: 14px;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem var(--space);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.footer-brand strong {
  font-family: var(--font-display);
  display: block;
  font-size: 1.1rem;
}

.footer-brand small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  font-size: 0.9rem;
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  text-decoration: none;
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Service detail page */
.page-hero {
  position: relative;
  min-height: 200px;
  max-height: 380px;
}

@media (min-width: 700px) {
  .page-hero {
    min-height: 280px;
    max-height: 420px;
  }
}

.page-hero img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  max-height: 380px;
  object-fit: cover;
}

@media (min-width: 700px) {
  .page-hero img {
    min-height: 280px;
    max-height: 420px;
  }
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg), transparent 60%);
}

.page-hero h1 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  padding: var(--space);
  padding-top: 3rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  max-width: 1100px;
  margin-inline: auto;
  width: 100%;
}

.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem var(--space) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--link);
}

.article-body {
  max-width: 65ch;
}

.article-body p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.article-body ul {
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.bg-alt {
  background: #132438;
}
