/* Badiani 1932 — Common Styles */
/* Consolidated from all HTML files to reduce duplication */

/* Font Declarations */
@font-face {
  font-family: 'SuperGroteskB';
  src: url('fonts/SuperGroteskB-CdMed.woff2') format('woff2'),
       url('fonts/SuperGroteskB-CdMed.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SuperGroteskA';
  src: url('fonts/SuperGroteskA-Rg%5B7511%5D.woff2') format('woff2'),
       url('fonts/SuperGroteskA-Rg%5B7511%5D.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Digits-only font: SuperGroteskC for numbers 0-9 everywhere */
@font-face {
  font-family: 'SuperGroteskDigits';
  src: url('fonts/SuperGroteskC-MedLF.otf') format('opentype');
  font-weight: 1 1000;
  font-style: normal;
  unicode-range: U+0030-0039;
  font-display: swap;
}

/* Full SuperGroteskC for elements that reference it explicitly */
@font-face {
  font-family: 'SuperGroteskC';
  src: url('fonts/SuperGroteskC-MedLF.otf') format('opentype');
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables */
:root {
  --badiani-blue: #1e398d;
  --badiani-pink: #f067a6;
  --badiani-yellow: #D8A200;
  --badiani-cyan: #5B9AAD;
  --badiani-gray: #58595b;
  --bg-light: #f8f8f8;
  --surface: #ffffff;
  --space-xxl: 90px;
  --space-xl: 72px;
  --space-lg: 48px;
  --space-md: 28px;
  /* Altezza topbar desktop: 2*18px padding + logo clamp(42px,4vw,55px) */
  --topbar-h: calc(36px + clamp(42px, 4vw, 55px));
}

/* Skip Navigation Link (WCAG 2.1 Level A) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  background: var(--badiani-blue);
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius:0;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--badiani-pink);
  outline-offset: 2px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-width: none;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-padding-top: var(--topbar-h);
}
html::-webkit-scrollbar { display: none; }

html, body {
  scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body, html {
  font-family: 'SuperGroteskA', 'SuperGroteskC', 'SuperGroteskB', sans-serif;
  font-weight: 400;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-light);
  color: var(--badiani-gray);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  padding-top: var(--topbar-h);
}

body > * {
  opacity: 0;
  transform: translateY(-16px);
  animation: page-reveal 0.5s ease-out forwards;
}

body > *:nth-child(1){ animation-delay: 0.03s; }
body > *:nth-child(2){ animation-delay: 0.06s; }
body > *:nth-child(3){ animation-delay: 0.09s; }
body > *:nth-child(4){ animation-delay: 0.12s; }
body > *:nth-child(5){ animation-delay: 0.15s; }
body > *:nth-child(n+6){ animation-delay: 0.18s; }

@keyframes page-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

h1, h2, h3 {
  font-family: 'SuperGroteskDigits', 'SuperGroteskB', 'SuperGroteskA', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--badiani-blue);
}

/* ===== Title Accent — decorative pink square ===== */
.title-accent {
  position: relative;
  z-index: 1;
  display: inline-block;
}

/* Pink square — sits behind the first letters.
   Uses em units so it scales proportionally with the title font-size
   and stays anchored to the same letter on any viewport. */
.title-accent::before {
  content: '';
  position: absolute;
  width: 0.52em;
  height: 0.52em;
  background: var(--badiani-pink);
  left: -0.08em;
  top: -0.02em;            /* alzato ~20px rispetto a prima */
  z-index: -1;
}

/* Thin decorative line — removed */

/* On dark backgrounds, make the line lighter */
.title-accent--light::after {
  display: none;
}

/* Topbar Component */
.topbar {
  background: var(--badiani-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 3.2vw, 40px);
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-top: calc(18px + constant(safe-area-inset-top));
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  will-change: transform;
  contain: layout style;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.topbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.topbar__logo:focus { outline: none; }
.topbar__logo:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
  border-radius:0;
}

.topbar__logo img {
  height: clamp(42px, 4vw, 55px);
  width: auto;
  object-fit: contain;
  filter: invert(1) grayscale(1) brightness(200%);
  mix-blend-mode: screen;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}

.topbar__lang {
  display: flex;
  align-items: center;
}

.topbar__select {
  /* hidden — source of truth per i18n/setLang; UI gestita da .topbar__lang-dd */
  display: none;
}

/* ─── Desktop lang custom dropdown ─── */
.topbar__lang-dd {
  position: relative;
}
.topbar__lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: none;
  border: none;
  font-size: clamp(12px, 0.9vw, 14px);
  letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
  text-transform: uppercase;
  padding: clamp(6px, 0.6vw, 8px) clamp(8px, 1vw, 14px);
  min-height: 44px;
  border-radius:0;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.3s, transform 0.3s;
}
.topbar__lang-trigger:hover {
  background: var(--badiani-pink);
  transform: translateY(-2px);
}
.topbar__lang-trigger[aria-expanded="true"] {
  background: var(--badiani-pink);
}
.topbar__lang-panel {
  position: fixed;
  top: var(--topbar-h);
  right: clamp(16px, 3.2vw, 40px);
  background: var(--badiani-blue);
  border-radius:0;
  overflow: hidden;
  min-width: 80px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.topbar__lang-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}
.topbar__lang-opt {
  display: block;
  width: 100%;
  color: #fff;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'SuperGroteskB', 'SuperGroteskA', sans-serif;
  padding: 12px 16px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.topbar__lang-opt:last-child {
  border-bottom: none;
}
.topbar__lang-opt:hover,
.topbar__lang-opt.is-active {
  background: var(--badiani-pink);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 20px);
}

.topbar__nav a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(12px, 0.9vw, 14px);
  letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
  text-transform: uppercase;
  padding: clamp(6px, 0.6vw, 8px) clamp(8px, 1vw, 14px);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius:0;
  border: none;
  font-weight: 500;
  transition: background 0.3s, transform 0.3s;
  touch-action: manipulation;
}

.topbar__nav a:hover {
  background: var(--badiani-pink);
  color: #fff;
  transform: translateY(-2px);
}

/* ─── Desktop Dropdown Nav ─── */
.topbar__dropdown {
  position: relative;
}
.topbar__dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 3.5px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.topbar__dropdown:hover > a::after,
.topbar__dropdown:focus-within > a::after {
  transform: rotate(180deg);
}
.topbar__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  background: var(--badiani-blue);
  border-radius:0;
  padding: 6px 0;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0s 0.15s;
  display: flex;
  flex-direction: column;
}
.topbar__dropdown:hover .topbar__dropdown-menu,
.topbar__dropdown:focus-within .topbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s ease, visibility 0s 0s;
}
.topbar__dropdown-menu a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.5px;
  padding: 9px 20px;
  white-space: nowrap;
  transition: background 0.2s;
  border-radius:0;
  min-height: auto;
  text-transform: none;
  font-weight: 400;
  transform: none;
}
.topbar__dropdown-menu a:hover,
.topbar__dropdown-menu a:focus {
  background: var(--badiani-pink);
  transform: none;
}

/* ─── Mobile Nav Groups (accordion) ─── */
.topbar__mobile-group {
  width: 100%;
}
.topbar__mobile-group-header {
  display: flex;
  align-items: stretch;
}
.topbar__mobile-group-header > a {
  flex: 1;
}
.topbar__mobile-group-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.topbar__mobile-group-toggle svg {
  transition: transform 0.25s;
}
.topbar__mobile-group-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.topbar__mobile-group-toggle:hover,
.topbar__mobile-group-toggle:active {
  color: #fff;
}
.topbar__mobile-group-items {
  display: none;
  flex-direction: column;
  align-items: stretch;
}
.topbar__mobile-group-items.is-open {
  display: flex;
}
.topbar__mobile-nav .topbar__mobile-group-items a {
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.5px;
  text-transform: none;
  padding: 10px 20px 10px 36px;
  border: none;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
}
.topbar__mobile-group-items a:hover,
.topbar__mobile-group-items a:active {
  background: var(--badiani-pink);
  color: #fff;
}

/* ─── Hamburger Menu (Mobile) ─── */
.topbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  -webkit-tap-highlight-color: transparent;
}

.topbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius:0;
  transition: transform 0.3s ease, opacity 0.2s ease;
  position: relative;
}

.topbar__hamburger span::before,
.topbar__hamburger span::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius:0;
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.topbar__hamburger span::before { top: -7px; }
.topbar__hamburger span::after  { top:  7px; }

/* Animated X when open */
.topbar__hamburger[aria-expanded="true"] span {
  background: transparent;
}
.topbar__hamburger[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}
.topbar__hamburger[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.topbar__hamburger:focus { outline: none; }
.topbar__hamburger:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  border-radius:0;
}

/* Mobile dropdown nav */
.topbar__mobile-nav {
  display: none;
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: 260px;
  background: var(--badiani-blue);
  z-index: 999;
  flex-direction: column;
  align-items: stretch;
  opacity: 0;
  transition: opacity 0.15s ease;
  overflow-y: auto;
  max-height: calc(100vh - var(--topbar-h));
  max-height: calc(100dvh - var(--topbar-h));
  border-radius:0;
  box-shadow: -4px 8px 24px rgba(0,0,0,0.18);
}

.topbar__mobile-nav.is-open {
  display: flex;
  opacity: 1;
}

.topbar__mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(12px, 0.9vw, 14px);
  letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
  text-transform: uppercase;
  font-family: inherit;
  padding: 14px 20px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border: none;
  border-radius:0;
  font-weight: 500;
  transition: background 0.2s;
}

.topbar__mobile-nav a.topbar__mobile-close {
  display: none;
}

.topbar__mobile-nav a:hover,
.topbar__mobile-nav a:active {
  background: var(--badiani-pink);
}

/* ─── Mobile nav language picker ─── */
.topbar__mobile-lang {
  display: flex;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.topbar__mobile-lang-btn {
  flex: 1;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  font-size: clamp(12px, 0.9vw, 14px);
  letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
  text-transform: uppercase;
  font-family: inherit;
  padding: 14px 0;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.topbar__mobile-lang-btn:last-child {
  border-right: none;
}
.topbar__mobile-lang-btn:hover,
.topbar__mobile-lang-btn:active,
.topbar__mobile-lang-btn.is-active {
  background: var(--badiani-pink);
  color: #fff;
}

@media (max-width: 768px) {
  :root { --topbar-h: 68px; }
  .topbar__lang { display: none; }
  .topbar__nav { display: none; }
  .topbar__dropdown-menu { display: none !important; }
  .topbar__hamburger { display: flex; }
  .topbar:has(.topbar__hamburger[aria-expanded="true"]) {
    box-shadow: none;
  }
  .topbar {
    padding: 14px clamp(12px, 3vw, 24px);
  }
  .topbar__logo img {
    height: 40px;
  }
}

@media (max-width: 400px) {
  :root { --topbar-h: 60px; }
  .topbar {
    padding: 12px;
  }
  .topbar__logo img {
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar__mobile-nav {
    transition: none;
  }
  .topbar__hamburger span,
  .topbar__hamburger span::before,
  .topbar__hamburger span::after {
    transition: none;
  }
}

/* ========== GLOBAL FOOTER ========== */
.site-footer {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.85);
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 80px) 0;
  font-size: 14px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.footer-logo-link img {
  height: 51px;
  width: auto;
}

.footer-tagline {
  font-family: 'SuperGroteskA', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h3 {
  font-family: 'SuperGroteskDigits', 'SuperGroteskB', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  font-family: 'SuperGroteskA', sans-serif;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--badiani-pink);
}

.footer-bottom {
  margin-top: clamp(28px, 4vw, 48px);
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-family: 'SuperGroteskA', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
  }
  .footer-tagline {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col {
    text-align: center;
  }
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(26, 26, 46, 0.99);
  color: rgba(255, 255, 255, 0.9);
  padding: 18px clamp(16px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  will-change: transform;
  contain: layout style;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cookie-banner.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__text {
  font-size: 13px;
  line-height: 1.6;
  max-width: 680px;
  flex: 1 1 400px;
}

.cookie-banner__text a {
  color: var(--badiani-pink);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner__btn {
  border: none;
  border-radius:0;
  padding: 10px 24px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  touch-action: manipulation;
  min-height: 44px;
}

.cookie-banner__btn:focus-visible {
  outline: 2px solid var(--badiani-pink);
  outline-offset: 2px;
}

.cookie-banner__btn--accept {
  background: var(--badiani-pink);
  color: #fff;
}

.cookie-banner__btn--accept:hover {
  background: #e0559a;
  transform: translateY(-1px);
}

.cookie-banner__btn--info {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-banner__btn--info:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px 18px 20px;
    gap: 12px;
  }
  .cookie-banner__text {
    flex: none;
    width: 100%;
  }
  .cookie-banner__actions {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

/* ========== FORM SUBMIT FEEDBACK ========== */
.form-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius:0;
  border: 1px solid rgba(30, 57, 141, 0.2);
  background: #eef3ff;
  color: var(--badiani-blue);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.form-feedback.is-progress {
  background: #eef3ff;
  border-color: rgba(30, 57, 141, 0.3);
  color: #1e398d;
}

.form-feedback.is-success {
  background: #e9f8ef;
  border-color: rgba(18, 124, 86, 0.35);
  color: #127c56;
}

.form-feedback.is-error {
  background: #fff1f1;
  border-color: rgba(180, 35, 24, 0.35);
  color: #b42318;
}

/* ========== VIDEO — hide native controls & play overlay ========== */
video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
video::-moz-media-controls { display: none !important; }
video { object-fit: cover; }
