/* ============================================================
   Power2Control — Foglio di stile
   Derivato dal wireframe approvato (Power2Control Wireframe v2)
   ============================================================ */

/* ============ FONT (self-hosted, subset latin) ============ */
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ============ TOKEN ============ */
:root {
  --navy: #051C4E;
  --navy-deep: #030F2E;
  --blue: #0E4DA4;
  --blue-bright: #2D7BE0;
  --green: #84C440;
  --green-deep: #4E9B2D;
  --grad: linear-gradient(115deg, #8CC63E 0%, #2E9E6B 48%, #1156B4 100%);
  --mist: #F2F6FC;
  --ink: #0A1B3D;
  --ink-60: rgba(10, 27, 61, 0.66);
  --ink-40: rgba(10, 27, 61, 0.45);
  --line: rgba(14, 77, 164, 0.14);
  --error: #C92A3D;
  --shadow-rest: 0 2px 16px rgba(14, 77, 164, 0.07);
  --shadow-hover: 0 8px 28px rgba(14, 77, 164, 0.16);
  --radius: 12px;
  --nav-h: 64px;
  --display: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Fira Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: #FFFFFF; font-size: 16px; line-height: 1.55; }
img { display: block; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; text-wrap: pretty; }

/* ancore sotto la nav sticky */
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* gradient "2" — signature element */
.g2 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }

/* ============ PAGINE / TRANSIZIONE ============ */
.page { display: none; }
.page.is-active { display: block; animation: pageIn 0.45s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page.is-active { animation: none; } html { scroll-behavior: auto; } }

/* ============ LOGIN ============ */
.login-stage {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; padding: 48px 24px 96px;
  background:
    linear-gradient(160deg, rgba(3, 15, 46, 0.82) 0%, rgba(5, 28, 78, 0.66) 55%, rgba(3, 15, 46, 0.88) 100%),
    url("../img/hero-sfondo.jpg") center / cover no-repeat;
  position: relative;
}
.login-logo { width: min(540px, 86vw); height: auto; }
.login-card {
  width: min(420px, 92vw);
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 32px 32px 28px;
  box-shadow: 0 24px 60px rgba(3, 15, 46, 0.45);
}
.login-card h1 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-card p.hint { font-size: 14px; color: var(--ink-60); margin-bottom: 20px; }
.noscript-note { font-size: 14px; font-weight: 500; color: var(--error); margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 8px; }
.field-input {
  width: 100%; font-family: var(--body); font-size: 17px; color: var(--ink);
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #FFFFFF; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(14, 77, 164, 0.18); }
.field-input.is-error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(201, 42, 61, 0.14); animation: shake 0.35s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .field-input.is-error { animation: none; } }
.login-error { min-height: 22px; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--error); }
.btn-accedi {
  width: 100%; margin-top: 18px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: 0.01em; color: #FFFFFF;
  background: var(--grad); border: none; border-radius: 999px; padding: 15px 24px;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.btn-accedi:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(132, 196, 64, 0.35); }
.btn-accedi:active { transform: scale(0.99); }
.btn-accedi:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.login-pfizer { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 96px; opacity: 0.9; }

/* ============ NAV STICKY ============ */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(3, 15, 46, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topnav-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.topnav-logo { height: 26px; width: auto; flex: none; }
.topnav-links { display: flex; gap: 20px; margin-left: auto; list-style: none; align-items: center; }
.topnav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-family: var(--display); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color 0.2s, background 0.2s;
}
.topnav-links a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
.topnav-links a.active { color: #FFFFFF; border-bottom-color: var(--green); border-radius: 8px 8px 0 0; }
.nav-burger {
  display: none; margin-left: auto; cursor: pointer;
  background: none; border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 8px;
  color: #FFFFFF; font-family: var(--body); font-size: 14px; padding: 8px 14px;
}
.nav-burger:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
@media (max-width: 980px) {
  .topnav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: rgba(3, 15, 46, 0.97); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .topnav-links.is-open { display: flex; }
  .topnav-links a { padding: 13px 12px; font-size: 15px; }
  .topnav-links a.active { border-bottom-color: transparent; background: rgba(132, 196, 64, 0.16); border-radius: 8px; }
  .nav-burger { display: block; }
}

/* ============ HERO ============ */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 64px 24px 88px; text-align: center; position: relative;
  background:
    linear-gradient(170deg, rgba(3, 15, 46, 0.78) 0%, rgba(5, 28, 78, 0.55) 50%, rgba(3, 15, 46, 0.85) 100%),
    url("../img/hero-sfondo.jpg") center / cover no-repeat;
}
.hero-logo { width: min(680px, 88vw); height: auto; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 14px; font-weight: 600; color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 10px 20px;
  background: var(--navy);
  box-shadow: 0 4px 16px rgba(3, 15, 46, 0.35);
}
.hero-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero-pfizer { position: absolute; bottom: 26px; right: 32px; width: 96px; opacity: 0.92; }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-scroll svg { animation: drift 1.8s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero-scroll svg { animation: none; } }

/* ============ SEZIONI PROGRAMMA ============ */
.day-band { background: var(--navy-deep); color: #FFFFFF; padding: 56px 24px; position: relative; overflow: hidden; }
.day-band::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-sfondo.jpg") center / cover no-repeat; opacity: 0.14; pointer-events: none;
}
.day-band-inner { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.day-band .day-num { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 7vw, 88px); line-height: 1; }
.day-band h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.day-band .day-date { font-size: 17px; color: rgba(255, 255, 255, 0.72); }
.section { padding: 72px 24px; }
.section.alt { background: var(--mist); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.eyebrow { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 12px; }
.session-head { margin-bottom: 36px; }
.session-head h3 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; }
.mods { margin-top: 10px; font-size: 15px; color: var(--ink-60); }
.mods strong { color: var(--ink); font-weight: 600; }

/* Slot logistici */
.slots { max-width: 760px; }
.slots.closing { margin-top: 36px; }
.slot { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.slot:last-child { border-bottom: none; }
.slot-time { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.slot-title { font-size: 16px; }
.slot-title .who { color: var(--ink-60); font-size: 14.5px; display: block; }

/* Talk card */
.talks { display: flex; flex-direction: column; gap: 14px; }
.talk {
  display: grid; grid-template-columns: 118px 1fr auto; gap: 24px; align-items: center;
  background: #FFFFFF; border: 0.5px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow-rest);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.talk:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.talk-time { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--blue); line-height: 1.4; }
.talk-time span { display: block; color: var(--ink-40); font-weight: 600; font-size: 13px; }
.talk-body h4 { font-family: var(--display); font-size: 17.5px; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.talk-body .who { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.talk-body h4:last-child { margin-bottom: 0; }
.talk-body .who + .who { margin-top: 3px; }
/* etichetta interna alla card (es. "Restituzione breakout session 1") */
.talk-body .card-label { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 8px; }

/* Bottone download */
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; white-space: nowrap;
  font-family: var(--display); font-size: 13.5px; font-weight: 700; color: #FFFFFF;
  background: var(--blue); border: none; border-radius: 999px; padding: 11px 20px;
  transition: background 0.2s, transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.btn-download .btn-icon { display: inline-flex; }
.btn-download svg { flex: none; }
.btn-download:hover:not([disabled]) { background: var(--green-deep); transform: scale(1.03); box-shadow: 0 6px 18px rgba(78, 155, 45, 0.35); }
.btn-download:active:not([disabled]) { transform: scale(0.99); }
.btn-download:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.btn-download[disabled] {
  position: relative;
  cursor: not-allowed; background: #C7D2E4; color: #5B6B85; opacity: 0.75;
  transform: none; box-shadow: none;
}
/* tooltip su bottone disabilitato */
.btn-download[disabled]:hover::after {
  content: "Materiale non ancora disponibile";
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.4;
  color: #FFFFFF; background: var(--navy-deep);
  padding: 6px 12px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 14px rgba(3, 15, 46, 0.3); z-index: 5;
}
.sala .btn-download { padding: 10px 16px; font-size: 12.5px; }

/* Voce "Scarica il materiale" nella nav — download diretto.
   Il gradient solo su :not([disabled]) così lo stato grigio prevale quando
   il materiale non è ancora disponibile. */
.nav-download { padding: 8px 16px; font-size: 12.5px; }
.nav-download:not([disabled]) { background: var(--grad); }
.nav-download:hover:not([disabled]) { background: var(--grad); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(3, 15, 46, 0.45); }
/* tooltip del bottone disabilitato in nav: sotto la barra, per non essere tagliato in alto */
.nav-download[disabled]:hover::after { bottom: auto; top: calc(100% + 8px); }
@media (max-width: 980px) {
  .topnav-links li:last-child { margin-top: 8px; }
  .nav-download { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }
}

/* ============ CTA MATERIALE (recap unico) ============ */
.material-cta { padding: 56px 24px; }
.material-cta-inner {
  max-width: 1180px; margin: 0 auto;
  background: var(--navy); color: #FFFFFF; border-radius: 18px;
  padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.material-cta-inner::after {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero-sfondo.jpg") right center / cover no-repeat; opacity: 0.16; pointer-events: none;
}
.material-cta-inner > * { position: relative; z-index: 1; }
.material-cta .eyebrow { color: var(--green); margin-bottom: 10px; }
.material-cta h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; }
.material-cta .lead { margin-top: 10px; font-size: 15.5px; color: rgba(255, 255, 255, 0.82); max-width: 56ch; }
.material-cta .btn-download { flex: none; padding: 15px 28px; font-size: 15px; }
.material-cta .btn-download:not([disabled]) { background: var(--grad); }
.material-cta .btn-download:hover:not([disabled]) { background: var(--grad); transform: scale(1.03); box-shadow: 0 10px 28px rgba(3, 15, 46, 0.45); }
@media (max-width: 720px) {
  .material-cta-inner { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .material-cta .btn-download { width: 100%; }
}

/* Breakout */
.topic { margin-top: 40px; }
.topic-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.topic-letter {
  flex: none; font-family: var(--display); font-weight: 800; font-size: 15px; color: #FFFFFF;
  background: var(--grad); width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
}
.topic-head h4 { font-family: var(--display); font-size: 19px; font-weight: 700; }
.sale { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sala {
  background: #FFFFFF; border: 0.5px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-rest);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.sala:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.sala-tag {
  flex: none; font-family: var(--display); font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--blue); border: 1.5px solid var(--blue); border-radius: 6px; padding: 6px 10px;
}
.sala-body { flex: 1; font-size: 15px; font-weight: 600; }
@media (max-width: 860px) { .sale { grid-template-columns: 1fr; } }

/* Restituzione */
.restituzione {
  margin-top: 44px; background: var(--navy); color: #FFFFFF; border-radius: 16px;
  padding: 40px 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  position: relative; overflow: hidden;
}
.restituzione::after { content: ""; position: absolute; inset: 0; background: url("../img/hero-sfondo.jpg") right / cover no-repeat; opacity: 0.16; pointer-events: none; }
.restituzione > * { position: relative; z-index: 1; }
.restituzione .eyebrow { color: var(--green); margin-bottom: 10px; }
.restituzione blockquote { font-family: var(--display); font-size: clamp(19px, 2.2vw, 25px); font-weight: 700; line-height: 1.35; max-width: 34ch; }
.restituzione .meta { margin-top: 14px; font-size: 14.5px; color: rgba(255, 255, 255, 0.78); max-width: 64ch; }
.restituzione .meta strong { color: #FFFFFF; font-weight: 600; }
.restituzione .btn-download:not([disabled]) { background: var(--green-deep); }
.restituzione .btn-download:hover:not([disabled]) { background: var(--green); color: var(--navy-deep); }
@media (max-width: 860px) { .restituzione { grid-template-columns: 1fr; padding: 30px 26px; } }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy-deep); padding: 28px 24px; }
.site-footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer img { width: 88px; opacity: 0.9; }
.site-footer span { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }

/* ============ RESPONSIVE ============ */
/* Tablet: 768px – 1023px */
@media (max-width: 1023px) {
  .section { padding: 56px 24px; }
  .talk { gap: 18px; padding: 20px 22px; }
}
/* Mobile: < 768px */
@media (max-width: 767px) {
  .talk { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .slot { grid-template-columns: 1fr; gap: 2px; }
  .sala { flex-wrap: wrap; }
  .hero-pfizer { right: 24px; bottom: 84px; }
  .btn-download { width: 100%; }
  .restituzione .btn-download { justify-self: stretch; }
}
