:root {
  --bg: #ffffff;
  --bg2: #f7f8fb;
  --card: rgba(11, 17, 29, 0.04);
  --text: rgba(11, 17, 29, 0.92);
  --muted: rgba(11, 17, 29, 0.6);
  --border: rgba(11, 17, 29, 0.08);
  --accent: #0b84ff;

  --radius: 18px;
  --shadow: 0 12px 30px rgba(11, 17, 29, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: grid;
  gap: 2px;
}
.brand__name {
  font-weight: 800;
  letter-spacing: 0.3px;
}
.brand__tag {
  font-size: 12px;
  color: var(--muted);
}

/* Top bar / Header and footer logos */
.topbar {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.topbar__logos {
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar__logos img,
.footer__logos img {
  height: 56px;
  object-fit: contain;
  width: auto;
}
/* Preserve original size for PNRR/MUR and ensure Tech4You matches height */
.logo--miur,
.logo--tech4you {
  height: 56px;
  max-width: none;
  width: auto;
}
.header__logos,
.footer__logos {
  display: flex;
  gap: 10px;
  align-items: center;
}
.footer__logos img {
  filter: none;
}
@media (max-width: 900px) {
  /* Center topbar items and stack logos vertically on mobile */
  .topbar__inner {
    justify-content: center; /* center logos in topbar */
  }

  .topbar__logos,
  .footer__logos {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: auto;
  }

  .topbar__logos img,
  .footer__logos img {
    display: block;
    height: 80px; /* larger on mobile per request */
    width: auto;
  }

  /* Ensure MIUR and Tech4You have identical height and remain stacked (MIUR above) */
  .logo--miur,
  .logo--tech4you {
    height: 80px;
    max-width: none;
    width: auto;
  }
}

/* Dashboard preview iframe */
.dashboard__preview iframe,
.dashboard__preview img.dashboard__image {
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

#dashboard {
  scroll-margin-top: 120px; /* offset sticky header */
}

#partner {
  scroll-margin-top: 120px; /* offset sticky header */
}

.dashboard--grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: center;
}
.dashboard__media img.dashboard__image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.dashboard__info h2 {
  margin-top: 0;
}
@media (max-width: 900px) {
  .dashboard--grid {
    grid-template-columns: 1fr;
  }
  .dashboard__media img.dashboard__image {
    height: 200px;
  }
}

/* App demo: smartphone mockup + carousel (responsive) */
.app__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
}
.app__phone.card {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  width: 240px;
  height: 520px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  box-shadow: 0 12px 30px rgba(11, 17, 29, 0.06);
  position: relative;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* clip the moving track */
}
.phone__screen {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* display: block; */
}

@media (max-width: 900px) {
  .app__grid {
    grid-template-columns: 1fr;
  }
  .app__phone.card {
    padding: 12px;
  }
  .phone {
    max-width: 280px;
  }
}
.phone__prev,
.phone__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.phone__prev {
  left: -10px;
}
.phone__next {
  right: -10px;
}
.phone__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.phone__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(11, 17, 29, 0.12);
  border: none;
  cursor: pointer;
}
.phone__dots button.active {
  background: var(--accent);
}

/* Debug overlay for carousel (temporary) */
#carouselDebug {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 9999;
  max-width: 160px;
}
#carouselDebug pre {
  margin: 0;
  white-space: pre-wrap;
}
#carouselDebug #carouselDebugClose {
  position: absolute;
  top: 4px;
  right: 6px;
  cursor: pointer;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
}

.app__info h3 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .app__grid {
    grid-template-columns: 1fr;
  }
  .phone {
    margin: 0 auto;
  }
  .phone__prev {
    left: 6px;
    width: 42px;
    height: 42px;
    font-size: 22px;
    background: rgba(0, 0, 0, 0.45);
  }
  .phone__next {
    right: 6px;
    width: 42px;
    height: 42px;
    font-size: 22px;
    background: rgba(0, 0, 0, 0.45);
  }
}

/* Responsive sizing overrides for wide and narrow screens */
@media (min-width: 1200px) {
  .phone {
    max-width: 360px;
  }
}
@media (max-width: 720px) {
  .phone {
    max-width: 260px;
  }
}

.nav__toggle {
  display: none;
  font-size: 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

/* Navigation layout & spacing */
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.nav a:hover,
.nav a:focus {
  background: rgba(11, 17, 29, 0.04);
  outline: none;
}

.hero {
  padding: 64px 0 42px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .hero__media {
    margin-top: 18px;
  }
  .hero__media img {
    max-width: 100%;
  }
}

.kicker {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
}

.hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__media img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .hero__media {
    margin-top: 18px;
  }
  .hero__media img {
    max-width: 100%;
  }
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 56px);
  letter-spacing: -0.5px;
}

.lead {
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 18px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(11, 17, 29, 0.06);
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 600;
  color: var(--text);
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease;
}

.btn--primary {
  background: linear-gradient(180deg, #0b84ff, #066bd6);
  border-color: rgba(6, 107, 214, 0.9);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(11, 132, 255, 0.18);
}
.btn--primary:hover {
  filter: brightness(0.95);
  transform: translateY(-2px);
}
.btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.9);
}

.btn--ghost {
  background: transparent;
}

.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 17, 29, 0.06);
  color: var(--muted);
  background: rgba(11, 17, 29, 0.02);
}

/* RC1 badge for app download */
.badge--rc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(11, 132, 255, 0.18);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card__title {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.logos img {
  max-width: 100%;
  height: 44px;
  object-fit: contain;
  filter: brightness(1.1);
}

.logos--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
}

.logos--row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.section {
  padding: 64px 0;
}

.section--alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  margin-bottom: 24px;
  max-width: 780px;
}

.section__header h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.grid {
  display: grid;
  gap: 16px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.feature,
.partner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.partner__logo {
  display: block;
  height: 54px;
  object-fit: contain;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .partner__logo {
    height: 36px;
    margin-bottom: 10px;
  }
}

.feature h3,
.partner h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature p,
.partner p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.link {
  color: var(--accent);
  font-weight: 700;
}

.wp {
  display: grid;
  gap: 14px;
}

.wp__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.wp__head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.wp__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(11, 132, 255, 0.18);
  background: rgba(11, 132, 255, 0.1);
  color: #04335f;
  font-weight: 800;
  font-size: 12px;
}

.wp__item p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.wp__item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.checklist li {
  margin: 10px 0;
  padding-left: 26px;
  position: relative;
  line-height: 1.5;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.cta {
  padding: 54px 0;
}

.cta__inner {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
}

/* Modal: deliverables (password-protected) */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 20px;
  width: min(760px, calc(100% - 40px));
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}
.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
}
.modal__body p {
  margin: 0 0 8px;
}
.password-row {
  display: grid;
  gap: 8px;
}
.password-row input[type="password"] {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
}
.modal__actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.deliverables-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 8px;
}
.deliverables-list li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.deliverables-list li a .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deliverables-list li a .download {
  color: var(--accent);
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer__links {
  display: flex;
  gap: 14px;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .grid--3 {
    grid-template-columns: 1fr;
  }
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .nav {
    display: none;
  }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 58px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    width: auto;
    box-shadow: 0 8px 24px rgba(11, 17, 29, 0.06);
  }
  .nav.is-open a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 700;
  }
  .nav.is-open a + a {
    margin-top: 8px;
  }
  .nav__toggle {
    display: inline-flex;
  }
  .cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Footer responsive adjustments */
  .topbar__inner {
    justify-content: center; /* center logos in topbar on mobile */
  }
  .footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }
  .footer__inner p {
    order: 1;
    margin: 0;
  }
  .footer__logos {
    order: 2;
    margin-top: 12px;
  }
  .footer__logos img {
    height: 80px;
    object-fit: contain;
    width: auto;
  }
  .footer__links {
    order: 3;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
}
