/* Footer: Instagram, newsletter, information requests, showroom map and closing line.
   Same palette, type and buttons as the rest of the site; full-width bands, no cards. */
.site-footer { background: var(--site-bg); border-top: 1px solid var(--line); }
.site-footer h2 { font-size: clamp(2.6rem, 4.6vw, 4.2rem); margin-bottom: 18px; }
.site-footer .eyebrow { display: flex; align-items: center; }
.footer-lead { color: var(--text-muted); font-size: 1rem; max-width: 520px; margin: 0; }
.footer-newsletter, .footer-request, .footer-visit { padding-block: var(--section-space); }
.footer-newsletter, .footer-request, .footer-visit { border-top: 1px solid var(--line); }
.footer-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: end; }

/* Instagram: a slim band with the latest posts drifting slowly from right to left. */
/* Enough room above the posts to read as its own section after La nostra storia. */
.footer-instagram { padding-block: calc(var(--section-space) * .65) calc(var(--section-space) * .55); }
.instagram-band { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: center; }
.instagram-head { display: flex; flex-direction: column; gap: 14px; }
.instagram-title { display: flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap; font-size: .75rem; font-weight: 500; letter-spacing: .3em; color: #f1f1ee; }
.instagram-title svg { width: 18px; height: 18px; flex-shrink: 0; color: #e32630; }
.instagram-follow { font-size: .6875rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); transition: color .2s; }
.instagram-follow:hover { color: #fff; }
.instagram-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.instagram-viewport::-webkit-scrollbar { display: none; }
.instagram-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; width: max-content; animation: instagram-strip var(--strip-duration, 60s) linear infinite; will-change: transform; }
/* Exactly one set of posts per cycle: the next frame is identical to the first, so the loop has no seam. */
@keyframes instagram-strip { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--strip-shift, -50%), 0, 0); } }
.instagram-viewport:hover .instagram-track, .instagram-viewport:focus-within .instagram-track, .instagram-viewport.is-held .instagram-track { animation-play-state: paused; }
.instagram-track a { position: relative; display: block; width: 180px; height: 180px; overflow: hidden; background: var(--surface); }
.instagram-track img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.instagram-track a::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s;
  background: rgb(0 0 0 / 28%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Ccircle cx='17.4' cy='6.6' r='.9' fill='white' stroke='none'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.instagram-track a:hover img, .instagram-track a:focus-visible img { transform: scale(1.05); }
.instagram-track a:hover::after, .instagram-track a:focus-visible::after { opacity: 1; }
.instagram-pending { margin: 0; font-size: .8125rem; color: var(--text-muted); }

/* Newsletter: a single hairline field with the button on the same line. */
.newsletter-form { width: 100%; max-width: 560px; justify-self: end; }
.line-field { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-strong); transition: border-color .2s; }
.line-field:focus-within { border-color: #e32630; }
.line-field input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font-size: 1rem; padding: 16px 0; }
.line-field input::placeholder { color: var(--text-muted); }
.line-field input:focus { outline: 0; }
.line-submit { border: 0; background: none; padding: 16px 0; font-size: .8125rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #fff; transition: color .2s; }
.line-submit:hover { color: #ff5a62; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: .8125rem; line-height: 1.6; color: var(--text-muted); cursor: pointer; }
.consent input { flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #d9232e; }
.consent a { color: var(--text-secondary); border-bottom: 1px solid #666; }
.consent a:hover { color: #fff; }
.form-status { min-height: 1.6em; margin: 14px 0 0; font-size: .875rem; color: var(--text-secondary); }
.form-status.ok { color: #e8e8e5; }
.form-status.error { color: var(--accent-text); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Information requests. */
.request-actions { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.request-actions .info-label { margin: 0; }
.request-dialog { width: min(760px, calc(100vw - 48px)); }
@media (max-width: 700px) { .request-dialog { width: 100vw; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea { border: 0; border-bottom: 1px solid var(--line-strong); background: none; color: var(--text); font: inherit; font-size: .9375rem; letter-spacing: normal; text-transform: none; padding: 10px 0; resize: vertical; transition: border-color .2s; }
.form-grid input:focus, .form-grid textarea:focus { outline: 0; border-color: #e32630; }
.request-submit { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 26px; }
.request-submit .form-status { margin: 0; flex: 1; min-width: 200px; }

/* Showroom: one panel. The interactive map spreads behind the whole section and dissolves into the anthracite;
   it is darkest behind the details on the left and most legible on the right, where the pin sits. */
.visit-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 100px); align-items: stretch; }
.visit-info { display: flex; flex-direction: column; gap: 30px; align-items: flex-start; }
.visit-info h2 { margin: 0; }
.visit-info address { font-style: normal; font-size: 1.3rem; line-height: 1.6; }
.visit-contacts { display: flex; flex-direction: column; gap: 6px; }
.visit-contacts a { font-size: 1.05rem; transition: color .2s; }
.visit-contacts a:hover { color: #ff5a62; }
.visit-info .hours { width: 100%; max-width: 420px; }
.visit-layout { min-height: 480px; }
.visit-info { position: relative; z-index: 1; }
.visit-map { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--site-bg); }
/* Google's embed has no dark theme without an API key: invert it and turn the hues back, so the red pin stays red.
   The frame is wider than the section, so the pin (always at its centre) lands right of centre, away from the text. */
.visit-map iframe { position: absolute; top: 0; left: 0; width: 130%; height: 100%; border: 0; filter: invert(.9) hue-rotate(180deg) saturate(.5) brightness(.85) contrast(.95); }
.visit-map::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--site-bg) 0%, rgb(var(--site-bg-rgb) / 0%) 20%, rgb(var(--site-bg-rgb) / 0%) 80%, var(--site-bg) 100%),
    linear-gradient(90deg, rgb(var(--site-bg-rgb) / 95%) 0%, rgb(var(--site-bg-rgb) / 88%) 28%, rgb(var(--site-bg-rgb) / 55%) 48%, rgb(var(--site-bg-rgb) / 30%) 66%, rgb(var(--site-bg-rgb) / 34%) 88%, rgb(var(--site-bg-rgb) / 70%) 100%); }

/* Closing: logo and motto, hairline, social icons, legal line. */
.footer-closing { border-top: 1px solid var(--line); background: var(--surface-deep); padding: 56px 0 28px; }
.closing-brand { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.closing-brand img { width: 203px; height: auto; filter: invert(1); }
.closing-brand p { margin: 0; font-size: .8125rem; letter-spacing: .3em; color: var(--text-secondary); }
.social-links { display: flex; gap: 8px; padding: 26px 0; }
.social-links a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text-secondary); transition: color .2s, background .2s; }
.social-links a:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.social-links svg { width: 20px; height: 20px; }
.footer-legal { display: flex; justify-content: space-between; gap: 18px 30px; flex-wrap: wrap; font-size: .75rem; color: var(--text-muted); line-height: 1.8; }
.footer-legal > div { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal a:hover { color: #fff; }

/* Cinematic photography: each picture rises out of the anthracite and dissolves back into it.
   Masks fade every edge to transparent, so no border is ever visible; content always sits above. */
.footer-instagram, .footer-newsletter, .footer-request, .footer-visit, .footer-closing { position: relative; isolation: isolate; overflow: hidden; }
.footer-photo { position: absolute; z-index: -1; pointer-events: none; overflow: hidden; transform: translate3d(0, var(--parallax, 0px), 0); }
.footer-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: transform 14s cubic-bezier(.2, .6, .2, 1), opacity 1.6s ease; opacity: 0; }
.footer-photo.is-visible img { opacity: 1; transform: scale(1); }
.footer-photo::after { content: ''; position: absolute; inset: 0; background: rgb(var(--site-bg-rgb) / var(--photo-shade, .35)); }
.photo-newsletter { inset: 0 0 0 auto; width: 62%; opacity: .6; -webkit-mask-image: linear-gradient(to left, #000 0%, #000 25%, rgb(0 0 0 / 45%) 60%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(to left, #000 0%, #000 25%, rgb(0 0 0 / 45%) 60%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%); -webkit-mask-composite: source-in; mask-composite: intersect; --photo-shade: .62; }
.photo-request { inset: 0 auto 0 0; width: 58%; opacity: .6; -webkit-mask-image: linear-gradient(to right, #000 0%, #000 20%, rgb(0 0 0 / 45%) 58%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 25%, #000 75%, transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 20%, rgb(0 0 0 / 45%) 58%, transparent 100%), linear-gradient(to bottom, transparent 0%, #000 25%, #000 75%, transparent 100%); -webkit-mask-composite: source-in; mask-composite: intersect; --photo-shade: .55; }
.photo-closing { inset: 0; opacity: .12; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 65%, transparent 100%), linear-gradient(to right, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 65%, transparent 100%), linear-gradient(to right, transparent, #000 25%, #000 75%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; --photo-shade: .3; }
.footer-closing { background: var(--surface-deep); }
.newsletter-form { position: relative; }
.newsletter-form::before { content: ''; position: absolute; inset: -40px -60px; z-index: -1; background: radial-gradient(closest-side, rgb(var(--site-bg-rgb) / 70%), transparent); pointer-events: none; }

/* Gentle reveal while scrolling. */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  /* minmax(0, 1fr): a long word or the form never makes the column wider than the screen. */
  .footer-split, .visit-layout { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .newsletter-form, .request-actions { justify-self: start; align-items: flex-start; }
  .instagram-band { grid-template-columns: 1fr; gap: 16px; }
  .instagram-head { flex-direction: row; justify-content: space-between; align-items: center; }
  /* Stacked: the text fills the top, the map opens up in the space kept free below it, pin centred there. */
  .footer-visit { --map-room: 360px; padding-bottom: var(--map-room); }
  .visit-layout { min-height: 0; }
  .visit-map iframe { width: 100%; height: 130%; top: calc(100% - 180px - 65%); }
  .visit-map::after { background:
    linear-gradient(90deg, rgb(var(--site-bg-rgb) / 35%) 0%, rgb(var(--site-bg-rgb) / 0%) 25%, rgb(var(--site-bg-rgb) / 0%) 75%, rgb(var(--site-bg-rgb) / 35%) 100%),
    linear-gradient(180deg, var(--site-bg) 0%, rgb(var(--site-bg-rgb) / 92%) 30%, rgb(var(--site-bg-rgb) / 88%) calc(100% - var(--map-room) - 60px), rgb(var(--site-bg-rgb) / 26%) calc(100% - var(--map-room) + 80px), rgb(var(--site-bg-rgb) / 20%) calc(100% - 70px), var(--site-bg) 100%); }
}
@media (max-width: 700px) {
  /* Simpler compositions on phones: photos fade top to bottom behind the text, lighter and still. */
  .photo-newsletter, .photo-request { inset: 0 0 auto 0; width: auto; height: 70%; opacity: .32; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, rgb(0 0 0 / 50%) 60%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 25%, rgb(0 0 0 / 50%) 60%, transparent 100%); }
  .footer-photo { transform: none; }
  .footer-photo img { transform: none !important; transition: opacity 1.2s ease; }
  .site-footer h2 { font-size: 2.6rem; }
  .footer-newsletter, .footer-request, .footer-visit { padding-block: var(--section-space); }
  .instagram-track a { width: 128px; height: 128px; }
  .instagram-title { letter-spacing: .2em; }
  .instagram-head { flex-wrap: wrap; gap: 8px 20px; }
  .instagram-follow { white-space: nowrap; letter-spacing: .14em; }
  .instagram-track { gap: 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-visit { --map-room: 320px; padding-bottom: var(--map-room); }
  .visit-map iframe { top: calc(100% - 160px - 65%); }
  .closing-brand { flex-direction: column; align-items: flex-start; }
  .closing-brand img { width: 170px; }
  .footer-legal { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-photo { transform: none; }
  .footer-photo img { opacity: 1; transform: none !important; transition: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .instagram-track img, .instagram-track a::after { transition: none; }
  .instagram-track { animation: none; }
}

/* Report responsive M4: links shorter than 24 px were hard to hit with a finger. The touch area grows by a few pixels
   above and below; the negative margin keeps the page exactly where it was. */
.footer-legal a, .instagram-follow { display: inline-block; padding-block: 4px; margin-block: -4px; }

/* Report responsive B5: the newsletter line only turned red (1 px) when the field was reached with the keyboard.
   With Tab the line is now twice as thick: visible, and the same line as before. */
.line-field:has(input:focus-visible) { box-shadow: 0 1px 0 #e32630; }

/* "Informazioni societarie" (public/company-info.js): a button that looks like the links next to it, and the company
   details in the site's own pop-up (.info-dialog, gallery.css), narrower. Also on the MC Experience pages. */
.company-link { display: inline-block; padding: 4px 0; margin-block: -4px; border: 0; background: none; color: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; transition: color .2s; }
.company-link:hover { color: #fff; }
.company-dialog { width: min(600px, calc(100vw - 48px)); }
.company-dialog .info-head { align-items: center; }
.company-dialog .info-title { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.company-name { margin: 0 0 20px; font-size: .9375rem; font-weight: 500; letter-spacing: .08em; color: var(--text); }
.company-facts { margin: 0; }
.company-facts > div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-top: 1px solid #ffffff14; }
.company-facts dt { font-size: .8125rem; letter-spacing: .04em; color: var(--text-muted); }
.company-facts dd { margin: 0; font-size: .9375rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.company-facts a { color: var(--text); border-bottom: 1px solid #ffffff40; transition: border-color .2s, color .2s; }
.company-facts a:hover { color: #fff; border-color: #d9232e; }
@media (max-width: 700px) {
  .company-dialog { width: 100vw; }
  .company-name { margin-bottom: 12px; }
  .company-facts > div { grid-template-columns: 1fr; gap: 0; padding: 7px 0; line-height: 1.5; }
  .company-facts dt { font-size: .75rem; }
}
