/* ZC INTERNATIONAL — Virtual Business Card (design handoff, high-fidelity) */
:root {
  --red:    #E01F26;
  --red-h:  #C81A20;
  --screen: #0b0b0b;
  --btn:    #ededed;
  --btn-h:  #e2e2e2;
}

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

html { background: #0b0b0b; }
body {
  font-family: 'Barlow', Arial, sans-serif;
  background: #0b0b0b url('assets/pattern-zc.png') center top / 100% auto repeat-y;
  color: #fff;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}
/* scrim a tutta area: tiene leggibile il testo sopra il pattern (spec G) */
body::before {
  content: ""; position: fixed; inset: 0; max-width: 430px; margin: 0 auto;
  pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(11,11,11,0) 0%, rgba(11,11,11,.5) 22%,
              rgba(11,11,11,.68) 45%, rgba(11,11,11,.72) 100%);
}
body > * { position: relative; z-index: 1; }

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8,8,8,.97);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.menu.open { opacity: 1; pointer-events: auto; transform: none; }
.menu-link {
  color: #fff; text-decoration: none;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700; font-size: 22px; letter-spacing: .05em;
  text-transform: uppercase;
}
.menu-link:active { color: var(--red); }
.menu-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: 0; color: #fff;
  font-size: 34px; cursor: pointer; line-height: 1;
}

/* ---------- hero ---------- */
.hero { position: relative; height: 270px; }
.hero-slide {
  position: absolute; inset: 0;
  background: center 60%/cover no-repeat #1e1e1e;
  filter: grayscale(1) brightness(.5) contrast(1.1);
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.on { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,.55), rgba(6,6,6,.25) 40%, var(--screen));
}
.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 20px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.topbar-logo { width: 88px; display: block; }
.hamburger {
  background: none; border: 0; color: #fff;
  font-size: 22px; padding-top: 6px; cursor: pointer;
}
.avatar {
  position: absolute; left: 50%; bottom: -52px;
  transform: translateX(-50%);
  width: 118px; height: 118px;
  border-radius: 50%;
  border: 3px solid var(--red);
  box-shadow: 0 10px 24px rgba(0,0,0,.6);
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #2a2a2a 0 6px, #1e1e1e 6px 12px);
  z-index: 2;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- identità ---------- */
.identity { padding: 66px 22px 24px; text-align: center; }
.identity h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700; font-size: 25px;
  text-transform: uppercase; letter-spacing: .02em;
}
.role {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600; font-size: 17px;
  color: var(--red); margin-top: 5px;
}
.role-rule {
  display: inline-block; width: 46px; height: 2px;
  background: var(--red); margin-top: 8px;
}

/* ---------- azioni ---------- */
.actions { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 9px; }
.action {
  display: flex; align-items: center; gap: 15px;
  background: var(--btn); color: #141414;
  text-decoration: none;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500; font-size: 17px;
  padding: 12px 18px; border-radius: 12px;
  transition: background .12s ease-out, transform .12s ease-out;
}
.action:hover { background: var(--btn-h); }
.action:active { transform: scale(.985); background: var(--btn-h); }
.action:focus-visible, .save-btn:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px;
}
.action .ico {
  width: 22px; text-align: center;
  font-size: 17px; color: #111;
}
.action.hidden { display: none; }

.save-btn {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  width: 100%; margin-top: 5px;
  background: var(--red); color: #fff;
  border: 0; border-radius: 12px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600; font-size: 18px;
  padding: 16px 18px; cursor: pointer;
  transition: background .12s ease-out, transform .12s ease-out;
}
.save-btn i { font-size: 17px; }
.save-btn:hover { background: var(--red-h); }
.save-btn:active { transform: scale(.985); }

/* Aggiungi a Wallet — visibile solo se la persona ha un pass configurato */
.wallet-btn {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  width: 100%; margin-top: 4px;
  background: #000; color: #fff;
  border: 1px solid #3a3a3a; border-radius: 12px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600; font-size: 17px;
  padding: 15px 18px; text-decoration: none;
  transition: border-color .12s ease-out, transform .12s ease-out;
}
.wallet-btn:hover { border-color: #6a6a6a; }
.wallet-btn:active { transform: scale(.985); }
.wallet-btn.hidden { display: none; }

/* Aggiungi a Google Wallet */
.gwallet-btn {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  width: 100%; margin-top: 4px;
  background: #fff; color: #202124;
  border: 1px solid #dadce0; border-radius: 12px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600; font-size: 17px;
  padding: 15px 18px; text-decoration: none;
  transition: filter .12s ease-out, transform .12s ease-out;
}
.gwallet-btn i { color: #4285F4; }
.gwallet-btn:active { transform: scale(.985); filter: brightness(.96); }
.gwallet-btn.hidden { display: none; }

/* ---------- about ---------- */
.about { padding: 20px 22px 0; }
h2 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700; font-size: 17px;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 12px;
}
.about p {
  font-size: 15px; line-height: 1.62; color: #d2d2d2;
  text-wrap: pretty;
}

/* ---------- progetti ---------- */
.projects { padding: 22px 22px 0; }
.rule-title { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.rule-title > span:first-child { display: inline-block; width: 3px; height: 16px; background: var(--red); flex: none; }
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.gallery img {
  width: 100%; height: 88px; object-fit: cover; display: block;
  background: #1e1e1e;
}

/* ---------- footer ---------- */
footer {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px 22px 30px; text-align: center;
}
.footer-logo { width: 118px; }
footer p { font-size: 12px; color: #9c9c9c; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid #4a4a4a; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #e6e6e6; font-size: 16px; text-decoration: none;
}
.footer-social a:active { border-color: var(--red); color: var(--red); }
.footer-social a.hidden { display: none; }
