/* ====== Global responsiveness + overflow guards ======
   IMPORTANT: do NOT set overflow-x: hidden on html/body — it breaks
   GSAP ScrollTrigger (creates a scroll-containing block).
   Use overflow-x: clip which prevents horizontal overflow without
   creating a new scroll context. */
html { overflow-x: clip; }
body { overflow-x: clip; }
* { box-sizing: border-box; }

/* Prevent rogue elements from forcing horizontal scroll */
img, svg, video, canvas { max-width: 100%; height: auto; }

/* PARLIAMO and other huge headings: avoid clipping */
@media (max-width: 640px) {
  h1[style*="vw"], h2[style*="vw"] {
    word-break: keep-all;
    overflow-wrap: anywhere;
    hyphens: none;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

/* ====== Site footer (injected by extras.js) ====== */
.m4-footer {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(14,26,56,0.95) 0%, rgba(7,16,36,0.98) 50%, rgba(3,6,20,1) 100%);
  color: #d4c9b3;
  padding: 4rem 1.5rem 2.5rem;
  border-top: 1px solid rgba(228,194,122,0.18);
  font-family: 'Cormorant Garamond', Georgia, serif;
  text-align: center;
  position: relative;
  z-index: 5;
}
.m4-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .m4-footer__inner {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    text-align: left;
  }
}
.m4-footer__brand img {
  width: 96px; height: 96px;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(228,194,122,0.35));
}
@media (min-width: 768px) {
  .m4-footer__brand img { margin: 0 0 1rem; }
}
.m4-footer__tagline {
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(212,201,179,0.75);
  max-width: 320px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .m4-footer__tagline { margin: 0; }
}
.m4-footer__heading {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e4c27a;
  margin: 0 0 1rem;
}
.m4-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 15px;
}
.m4-footer__list a {
  color: #d4c9b3;
  text-decoration: none;
  transition: color .2s ease;
}
.m4-footer__list a:hover { color: #e4c27a; }
.m4-footer__list address {
  font-style: normal;
  line-height: 1.55;
}
.m4-footer__bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(228,194,122,0.12);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(212,201,179,0.55);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 768px) {
  .m4-footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ====== Cookie banner ====== */
.m4-cookie {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 560px;
  background: rgba(7,16,36,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(228,194,122,0.35);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #d4c9b3;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(228,194,122,0.08);
  animation: m4CookieIn 0.4s ease-out;
}
@keyframes m4CookieIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.m4-cookie__title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e4c27a;
  margin: 0 0 0.5rem;
}
.m4-cookie__text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: rgba(212,201,179,0.85);
}
.m4-cookie__text a {
  color: #e4c27a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.m4-cookie__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.m4-cookie__btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 0.7rem 1rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid rgba(228,194,122,0.45);
  background: transparent;
  color: #d4c9b3;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.m4-cookie__btn:hover {
  background: rgba(228,194,122,0.1);
  color: #e4c27a;
}
.m4-cookie__btn--primary {
  background: linear-gradient(135deg, #8a6624 0%, #e4c27a 100%);
  color: #071024;
  border-color: transparent;
  font-weight: 600;
}
.m4-cookie__btn--primary:hover {
  filter: brightness(1.1);
  color: #071024;
}

/* ====== Legal pages ====== */
.m4-legal {
  background: #050a18;
  color: #d4c9b3;
  font-family: 'Cormorant Garamond', Georgia, serif;
  min-height: 100vh;
  padding: 4rem 1.5rem;
  line-height: 1.7;
}
.m4-legal__container {
  max-width: 760px;
  margin: 0 auto;
}
.m4-legal__brand {
  text-align: center;
  margin-bottom: 3rem;
}
.m4-legal__brand img {
  width: 120px; height: 120px;
  margin: 0 auto 1rem;
}
.m4-legal__brand a {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(228,194,122,0.85);
  text-decoration: none;
}
.m4-legal__brand a:hover { color: #e4c27a; }
.m4-legal h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 5vw, 44px);
  color: #e4c27a;
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: 0.04em;
}
.m4-legal__date {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212,201,179,0.5);
  margin-bottom: 3rem;
}
.m4-legal h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: #e4c27a;
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.03em;
}
.m4-legal h3 {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: #d4c9b3;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.03em;
}
.m4-legal p, .m4-legal li { font-size: 17px; color: #c4b89e; }
.m4-legal ul, .m4-legal ol { padding-left: 1.25rem; }
.m4-legal a { color: #e4c27a; text-decoration: underline; text-underline-offset: 2px; }
.m4-legal strong { color: #d4c9b3; }
.m4-legal__back {
  display: block;
  margin: 4rem auto 0;
  width: fit-content;
  padding: 0.8rem 2rem;
  border: 1px solid rgba(228,194,122,0.45);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e4c27a;
  text-decoration: none;
  transition: all .2s ease;
}
.m4-legal__back:hover {
  background: rgba(228,194,122,0.1);
}
