:root {
  --color-primary: #1b4965;
  --color-primary-dark: #0d2a3d;
  --color-accent: #5fa8d3;
  --color-accent-light: #cde6f5;
  --color-bg: #f7f9fb;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #51606b;
  --color-border: #e1e8ed;
  --shadow-sm: 0 1px 3px rgba(13, 42, 61, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 42, 61, 0.12);
  --radius: 10px;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

/* Language toggle */
[data-lang="en"] .lang-it {
  display: none;
}

[data-lang="it"] .lang-en {
  display: none;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-toggle button {
  display: block;
  width: 26px;
  height: 18px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  line-height: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lang-toggle button svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
}

.lang-toggle button:hover {
  opacity: 0.8;
}

.lang-toggle button.active {
  opacity: 1;
  border-color: var(--color-accent);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

a:hover {
  color: var(--color-accent);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section.container {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

/* Header / Nav */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  letter-spacing: 0.01em;
}

.nav-brand span {
  color: var(--color-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem 1rem;
  text-align: center;
  min-height: 460px;
  display: flex;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.55;
}

.hero-image-credit {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 2;
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade-in 0.9s ease forwards 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.hero p.hero-meta {
  font-size: 1.05rem;
  color: var(--color-accent-light);
  margin: 0 0 2rem;
}

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

.btn-primary:hover {
  background: #fff;
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  margin-left: 0.75rem;
}

.btn-outline:hover {
  border-color: #fff;
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.7rem;
  margin: 0 0 0.5rem;
  color: var(--color-primary-dark);
}

.section-subtitle {
  color: var(--color-muted);
  margin: 0 0 2.5rem;
  max-width: 640px;
}

.section-subtitle.full-width {
  max-width: none;
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-visual {
  background: linear-gradient(180deg, var(--color-accent-light), #eef6fb);
  border-radius: calc(var(--radius) - 2px);
  margin: -1.75rem -1.75rem 1.25rem;
  padding: 1rem 1.5rem;
}

.card-visual svg {
  width: 100%;
  height: 90px;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .card-visual svg {
  transform: scale(1.04);
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card h3 {
  margin: 0 0 0.6rem;
  color: var(--color-primary-dark);
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Schedule */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.timeline-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-item.break-item {
  background: var(--color-accent-light);
  border-color: transparent;
}

.timeline-time {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.timeline-body h2 {
  margin: 0 0 0.3rem;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.timeline-body .chair {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0 0 0.6rem;
  font-style: italic;
}

.speaker-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.speaker-list li {
  padding: 0.2rem 0;
  font-size: 0.92rem;
  color: var(--color-text);
}

.speaker-list li strong {
  color: var(--color-primary-dark);
}

/* Speakers page */
.speaker-card {
  text-align: center;
}

.avatar-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 1.4rem;
}

.avatar-photo {
  object-fit: cover;
  background: none;
}

.speaker-bio {
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.6rem;
}

.keynote-card {
  text-align: left;
}

.keynote-row {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.keynote-text {
  flex: 1;
}

.keynote-card .avatar-placeholder {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  font-size: 1.7rem;
  margin: 0;
}

.keynote-text h3 {
  margin: 0 0 0.3rem;
  color: var(--color-primary-dark);
}

.keynote-role {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.panel-abstract-box {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  background: linear-gradient(180deg, var(--color-accent-light), var(--color-surface));
  border-left: 4px solid var(--color-accent);
}

.panel-abstract-visual {
  flex-shrink: 0;
  width: 130px;
}

.panel-abstract-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

.panel-abstract-text {
  flex: 1;
}

.panel-abstract-question {
  margin: 0 0 0.75rem;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.panel-abstract {
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 640px) {
  .panel-abstract-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 560px;
  }
}

.keynote-abstract {
  margin-top: 1.25rem;
  color: var(--color-muted);
}

@media (max-width: 640px) {
  .keynote-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.bio-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.bio-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.bio-entry h3 {
  margin: 0 0 0.3rem;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.bio-role {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.bio-entry p:last-child {
  margin: 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.6rem;
}

.badge-confirmed {
  background: #e3f5e9;
  color: #1c7a45;
}

.badge-pending {
  background: #fdf1dc;
  color: #a3690f;
}

/* Register page */
.register-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.register-box .capacity-note {
  color: var(--color-muted);
  margin: 1rem 0 1.75rem;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.field-list {
  text-align: left;
  max-width: 480px;
  margin: 1.5rem auto 0;
  color: var(--color-muted);
}

/* Venue page */
.venue-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

.venue-photo-box {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.venue-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.photo-credit {
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-surface);
}

.transport-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.transport-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.transport-list li:last-child {
  border-bottom: none;
}

.transport-list strong {
  display: block;
  color: var(--color-primary-dark);
  margin-bottom: 0.25rem;
}

/* Committee */
.committee-list {
  columns: 2;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.committee-list li {
  padding: 0.3rem 0;
  break-inside: avoid;
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-logo-band {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.footer-logo-band img {
  max-width: 100%;
  width: auto;
  height: auto;
  background: #fff;
  padding: 1rem 1.25rem;
  border-radius: 8px;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.footer-logos img {
  height: 100px;
  width: auto;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.footer-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.75rem;
}

.footer-banner img {
  max-width: 100%;
  height: auto;
  width: 520px;
  border-radius: 8px;
}

.footer-info {
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-info a {
  color: #fff;
}

.footer-info a:hover {
  color: var(--color-accent-light);
}

.footer-legal {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-legal a:hover {
  color: var(--color-accent-light);
}

/* Placeholder blocks */
.placeholder-box {
  background: repeating-linear-gradient(
    45deg,
    var(--color-accent-light),
    var(--color-accent-light) 10px,
    #e6f2fa 10px,
    #e6f2fa 20px
  );
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .venue-grid {
    grid-template-columns: 1fr;
  }

  .committee-list {
    columns: 1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}
