/* ===== Permissor — Home landing page ===== */

:root {
  --darkest: #111111;
  --light-black: #1f1f1f;
  --dark-blue: #035b87;
  --deep-blue: #012f46;
  --brand: #007aff;
  --btn: #047db9;
  --btn-hover: #0594da;
  --beige: #e9e6e2;
  --card-beige: #f8f7f6;
  --text-dark: #012537;
  --pale: #e2ecf3;
  --white: #ffffff;

  --maxw: 1280px;
  --font-head: "Inter", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--darkest);
  color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 18px 32px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: background .2s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn--lg { font-size: 20px; padding: 26px 48px; }
.btn--header { padding: 24px 32px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 40px;
  background: rgba(31, 31, 31, .77);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
}
/* logo.png is a sprite/atlas — crop to the logo region (matches Figma transform) */
.brand-logo {
  display: block;
  position: relative;
  width: 226px;
  height: 50px;
  overflow: hidden;
}
.brand-logo img {
  position: absolute;
  width: 118.22%;
  height: 267.45%;
  left: -10.63%;
  top: -86.75%;
  max-width: none;
}
.brand-logo--footer { width: 248px; height: 55px; margin-bottom: 40px; }
.main-nav {
  display: flex;
  gap: 66px;
  font-family: var(--font-body);
  font-size: 16px;
  text-transform: uppercase;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.main-nav a:hover { color: var(--pale); }
.nav-cta { display: none; }    /* in-menu CTA, shown only on mobile */
.nav-theme { display: none; }  /* in-menu theme switch row, shown only on mobile */

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  text-transform: uppercase;
}
.lang-switch__opt {
  opacity: .55;
  transition: opacity .2s ease, color .2s ease;
}
.lang-switch__opt:hover { opacity: 1; }
.lang-switch__opt.is-active {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.lang-switch__opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lang-switch__sep { opacity: .35; }

/* ---------- Theme switch (pill toggle in header) ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.theme-switch {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.theme-switch:hover { background: rgba(255, 255, 255, .2); }
.theme-switch:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.theme-switch__icon {
  width: 16px;
  height: 16px;
  color: var(--white);
  pointer-events: none;
  z-index: 1;
}
.theme-switch__icon svg { display: block; width: 100%; height: 100%; }
.theme-switch__knob {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white);
  transform: translateY(-50%);
  transition: transform .2s ease;
  pointer-events: none;
}
/* light theme = knob left (sun); dark theme = knob right (moon) */
.theme-dark .theme-switch__knob { transform: translate(32px, -50%); }

/* ---------- Hamburger (mobile nav toggle) ---------- */
.nav-toggle {
  display: none;            /* shown only on mobile via media query */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* open state -> animate bars into an X */
.site-header.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Generic section ---------- */
.section { padding: 96px 0; position: relative; overflow: hidden; }
.section__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 60px;
  line-height: 64px;
  margin: 0 0 48px;
  max-width: 760px;
}
.bg-maps::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/vector-maps.png") center/cover no-repeat;
  opacity: .2;
  pointer-events: none;
  z-index: 0;
}
.section > .container { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  background: var(--darkest);
  padding-top: 178px;
  padding-bottom: 110px;
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 24px;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 70px;
  line-height: 74px;
  text-transform: uppercase;
  margin: 0 0 32px;
  max-width: 860px;
}
.hero__title .cap { text-transform: uppercase; }
.hero__lead {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  max-width: 540px;
  margin: 0 0 32px;
  color: var(--white);
}
.hero__guarantee {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 40px;
  max-width: 560px;
}
.hero__guarantee img { width: 56px; height: auto; }
.hero__guarantee p { margin: 0; font-size: 18px; }

/* ---------- Problemi (5 cards) ---------- */
.problemi { background: var(--light-black); }
.problemi .section__title { text-transform: uppercase; font-size: 40px; line-height: 1.1; }
.problemi .section__title .first { color: var(--white); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  border: 1px solid var(--white);
  border-radius: 10px;
  padding: 24px;
  min-height: 296px;
  display: flex;
  flex-direction: column;
}
.problem-card__icon {
  display: block;
  width: 39px; height: 39px;
  color: var(--white);
  margin-bottom: auto;
}
.problem-card__icon svg { width: 100%; height: 100%; }
.problem-card h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  color: var(--pale);
  margin: 0 0 12px;
}
.problem-card p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  margin: 0;
  color: var(--white);
}

/* ---------- 5 Ragioni ---------- */
.ragioni { background: var(--darkest); }
.reasons { list-style: none; margin: 0 0 64px; padding: 0; }
.reason {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 32px;
  align-items: start;
  border-top: 1px solid rgba(255,255,255,.5);
  padding: 28px 0;
}
.reason__num {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 25px;
}
.reason__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 28px;
  margin: 0;
  align-self: center;
}
.reason__body p {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 18px;
}
.reason__body p:first-child { font-weight: 500; }

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.pricing--2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.price-card {
  background: var(--light-black);
  border-radius: 10px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}
.price-card__name {
  font-family: var(--font-body);
  font-size: 28px;
  margin: 0 0 8px;
  line-height: 1.2;
  min-height: 2.4em; /* riserva 2 righe (2 × line-height): allinea prezzi tra le card */
}
.price-card__features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 18px;
  min-height: 58px; /* riserva 2 righe: allinea prezzi tra le card */
}
.price-card__features li { margin: 0 0 4px; }
.price-card__amount {
  font-family: var(--font-head);
  font-size: 38px;
  color: var(--brand);
}
.price-card__per { font-size: 23px; color: var(--white); }
.price-card__plans { margin: 8px 0 20px; }
.price-plan {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.price-plan + .price-plan { border-top: 1px solid rgba(255, 255, 255, .12); }
.price-plan__label { font-family: var(--font-body); font-size: 18px; color: var(--white); }
.price-plan__note { display: block; font-size: 12px; opacity: .7; }
.price-plan__amount { font-family: var(--font-head); font-size: 30px; color: var(--brand); }
.price-plan__per { font-size: 18px; color: var(--white); }
.price-card__cta { display: block; width: 100%; text-align: center; margin-top: auto; }
.center { text-align: center; }

/* ---------- 3 Passaggi ---------- */
.passaggi { background: var(--beige); color: var(--text-dark); }
.passaggi .section__title { color: var(--light-black); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step-card {
  background: var(--card-beige);
  border-radius: 22px;
  padding: 36px 32px;
  min-height: 469px;
  display: flex;
  flex-direction: column;
}
.step-card__num {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 25px;
  color: var(--text-dark);
  margin: 0 0 24px;
}
.step-card__icon {
  display: block;
  width: 32px; height: 32px;
  color: var(--brand);
  margin: 0 0 12px;
}
.step-card__icon svg { width: 100%; height: 100%; }
.step-card h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 36px;
  color: var(--brand);
  margin: 0;
}
.step-card p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 26px;
  color: var(--text-dark);
  margin: auto 0 0;
}

/* ---------- Per chi ---------- */
.perchi { background: var(--darkest); }
.perchi__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.perchi__intro h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 50px;
  line-height: 1.1;
  margin: 0;
}
.perchi__intro p {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 28px;
  line-height: 32px;
  margin: auto 0;
}
.dark-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.dark-card {
  background: var(--light-black);
  border-radius: 22px;
  padding: 36px 32px;
}
.dark-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 20px;
}
.dark-card p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 12px;
}

/* ---------- Piattaforma italiana ---------- */
.piattaforma { background: var(--dark-blue); }
.piattaforma__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.piattaforma__head h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 60px;
  line-height: 64px;
  margin: 0;
}
.piattaforma__head p {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  margin: auto 0;
}
.blue-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.blue-card {
  background: var(--deep-blue);
  border-radius: 22px;
  padding: 36px 32px;
  min-height: 445px;
  display: flex;
  flex-direction: column;
}
.blue-card__num {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 25px;
  order: 3;
  margin-top: auto;
  padding-top: 24px;
}
.blue-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 24px;
}
.blue-card p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
  margin: 0;
}

/* ---------- CTA finale ---------- */
.cta { background: #303030; text-align: left; }
.cta__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 60px;
  line-height: 64px;
  text-transform: uppercase;
  margin: 0 0 32px;
  max-width: 760px;
}
.cta__sub {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 30px;
  max-width: 690px;
  margin: 0 0 40px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #2b2b2b;
  padding: 56px 0 40px;
}
.footer-bar {
  border-top: 1px solid var(--white);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: "Outfit", var(--font-body);
  font-size: 14px;
}
.footer-bar nav { display: flex; gap: 24px; }
.footer-bar nav a:hover { color: var(--pale); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards-grid, .pricing, .steps, .dark-cards, .blue-cards { grid-template-columns: repeat(2, 1fr); }
  .perchi__intro, .piattaforma__head { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .container { padding: 0 20px; }

  /* Header: collapse centered nav into a hamburger dropdown */
  .site-header { padding: 0 16px 0 20px; }
  .nav-toggle { display: flex; }
  .header-actions { gap: 14px; }
  .btn--header { display: none; }            /* CTA moves into the dropdown (.nav-cta) */
  .header-actions > .theme-switch { display: none; }  /* switch moves into the dropdown (.nav-theme) */
  .main-nav {
    position: fixed;
    top: 74px; left: 0; right: 0;
    transform: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    background: rgba(31, 31, 31, .97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;            /* hidden until toggled */
  }
  .site-header.is-open .main-nav { display: flex; }
  .main-nav a { width: 100%; padding: 16px 24px; }

  /* theme switch row inside the dropdown */
  .nav-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    text-transform: uppercase;
  }
  .nav-theme .theme-switch { display: inline-flex; }

  /* language switcher row inside the dropdown */
  .lang-switch {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 24px;
    color: var(--white);
    font-size: 16px;
  }

  /* in-menu CTA: hug content, centered (not full-bleed) */
  .nav-cta {
    display: inline-block;
    align-self: center;
    width: auto;
    margin-top: 8px;
    padding: 14px 40px;
    text-align: center;
    color: var(--white);
    background: var(--btn);
    border-radius: 6px;
    text-transform: none;
    font-family: var(--font-head);
  }
  .main-nav a.nav-cta { width: auto; }   /* beat `.main-nav a { width:100% }` */
  .nav-cta:hover { background: var(--btn-hover); color: var(--white); }

  .hero { padding-top: 120px; }
  .hero__title { font-size: 44px; line-height: 1.1; }
  .section__title, .cta__title, .piattaforma__head h2 { font-size: 38px; line-height: 1.15; }
  .cards-grid, .pricing, .steps, .dark-cards, .blue-cards { grid-template-columns: 1fr; }
  .reason { grid-template-columns: 40px 1fr; }
  .reason__body { grid-column: 1 / -1; }
  .step-card h3 { margin-bottom: 40px; }
}

/* ===== Guide page (CMP-Microsoft) ===== */

/* ---------- Guide hero ---------- */
.guide-hero {
  background: var(--darkest);
  padding-top: 178px;
  padding-bottom: 90px;
}
.guide-hero::after {
  content: "";
  position: absolute;
  inset: 74px 0 auto 0;
  height: 100%;
  background: rgba(255, 255, 255, .13);
  pointer-events: none;
  z-index: 0;
}
.guide-hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 70px;
  line-height: 74px;
  text-transform: uppercase;
  margin: 0 0 48px;
  max-width: 964px;
}
.guide-hero__lead {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
  max-width: 540px;
  margin: 0;
}

/* ---------- Indice (pill nav) ---------- */
.guide-index { background: var(--darkest); padding: 64px 0; }
.index-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 29px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 32px;
}
.index-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.index-pill {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
  border: 1px solid var(--white);
  border-radius: 30px;
  padding: 10px 25px;
  transition: background .2s ease, color .2s ease;
}
.index-pill:hover { background: rgba(255, 255, 255, .12); }
.index-pill--active,
.index-pill--active:hover {
  background: var(--white);
  color: var(--darkest);
}

/* ---------- Guide cards ---------- */
.guide-section { background: var(--darkest); padding: 24px 0; }
.guide-card {
  border: 1px solid var(--white);
  border-radius: 22px;
  padding: 43px 46px;
}
.guide-card--filled { background: var(--light-black); }
.guide-card__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 16px;
}
.guide-card__intro {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 32px;
  max-width: 820px;
}

/* Prerequisiti list */
.guide-prereqs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
  max-width: 1040px;
}
.guide-prereqs li {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
}
.guide-prereqs li strong { font-weight: 700; }

/* ---------- Steps ---------- */
.guide-step { margin-top: 56px; }
.guide-step:first-of-type { margin-top: 40px; }
.guide-step__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 12px;
}
.guide-step__title .step-label { font-weight: 500; }
.guide-step p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 16px;
  max-width: 940px;
}
.guide-note {
  margin-top: 16px;
}
.guide-note strong { font-weight: 800; display: block; }
.guide-step__fig {
  width: 100%;
  max-width: 1204px;
  aspect-ratio: 1204 / 607;     /* uniform ~2:1 frame, per Figma */
  height: auto;                 /* aspect-ratio drives height */
  object-fit: cover;            /* fill the frame, cropping overflow */
  object-position: top center;  /* default: keep top of screenshot visible (matches Figma) */
  border-radius: 6px;
  margin: 24px 0 12px;
}
.guide-step__fig--bottom { object-position: bottom center; } /* steps 6/7: keep bottom of screenshot */
.guide-step__fig--center { object-position: center 60%; }        /* step 5.1: centred crop */
.guide-step__caption {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  line-height: 24px;
  margin: 0;
}

/* ---------- Verifica finale checks ---------- */
.guide-checks {
  margin: 0;
  padding-left: 27px;
  max-width: 940px;
}
.guide-checks li {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 24px;
  margin-bottom: 16px;
}
.guide-checks li:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  .guide-hero { padding-top: 120px; }
  .guide-hero__title { font-size: 40px; line-height: 1.1; }
  .guide-hero::after { display: none; }
  .index-pill { font-size: 18px; }
  .guide-card { padding: 28px 22px; }
  .guide-card__num { font-size: 32px; }
  .guide-prereqs { grid-template-columns: 1fr; }
}

/* ===== Light theme (theme class lives on <html>) ===== */
.theme-light body { background: var(--white); color: var(--text-dark); }

/* header stays the dark blurred bar -> keep white nav text */
.theme-light .main-nav { color: var(--white); }

/* hero -> blue */
.theme-light .hero { background: #0373ab; }
.theme-light .hero,
.theme-light .hero__lead { color: var(--white); }
.theme-light .hero .btn { background: var(--dark-blue); }   /* "vedi i prezzi" #035b87 */
.theme-light .hero .btn:hover { background: #046a9e; }

/* problemi -> white bg, dark-outlined cards */
.theme-light .problemi { background: var(--white); }
.theme-light .problemi .section__title,
.theme-light .problemi .section__title .first { color: var(--light-black); }
.theme-light .problem-card { border-color: var(--light-black); }
.theme-light .problem-card__icon { color: var(--light-black); }
.theme-light .problem-card h3,
.theme-light .problem-card p { color: var(--light-black); }

/* ragioni -> deep teal-blue (dark bg -> white text) */
.theme-light .ragioni { background: #02334b; }
.theme-light .ragioni .section__title,
.theme-light .reason__num,
.theme-light .reason__title,
.theme-light .reason__body p { color: var(--white); }
.theme-light .price-card { background: var(--dark-blue); }
.theme-light .price-card__name,
.theme-light .price-card__amount,
.theme-light .price-card__per,
.theme-light .price-plan__label,
.theme-light .price-plan__amount,
.theme-light .price-plan__per,
.theme-light .price-card__features { color: var(--white); }

/* passaggi -> cream bg, BLUE step cards w/ white text */
.theme-light .passaggi { background: #faf7ef; }
.theme-light .step-card { background: var(--dark-blue); }
.theme-light .step-card__num,
.theme-light .step-card h3,
.theme-light .step-card p,
.theme-light .step-card__icon { color: var(--white); }

/* perchi -> deep teal-blue, translucent white cards (white text) */
.theme-light .perchi { background: #02334b; }
.theme-light .perchi__intro h2,
.theme-light .perchi__intro p { color: var(--white); }
.theme-light .dark-card { background: rgba(255, 255, 255, .5); }
.theme-light .dark-card h3,
.theme-light .dark-card p { color: var(--white); }

/* piattaforma -> unchanged bg (#035b87 / #012f46), keep white text */
.theme-light .piattaforma__head h2,
.theme-light .piattaforma__head p,
.theme-light .blue-card h3,
.theme-light .blue-card p,
.theme-light .blue-card__num { color: var(--white); }

/* cta -> deep teal-blue (white text) */
.theme-light .cta { background: #02334b; }
.theme-light .cta__title,
.theme-light .cta__sub { color: var(--white); }

/* footer -> darker navy (white text) */
.theme-light .site-footer { background: #01283c; color: var(--white); }

/* ---- Guide page (CMP-Microsoft) ---- */
.theme-light .guide-hero { background: #0373ab; }
.theme-light .guide-hero__title,
.theme-light .guide-hero__lead { color: var(--white); }
.theme-light .guide-index,
.theme-light .guide-section { background: #fefdf6; }
.theme-light .index-label { color: var(--light-black); }
.theme-light .index-pill { color: var(--light-black); border-color: var(--light-black); }
.theme-light .index-pill:hover { background: rgba(0, 0, 0, .06); }
.theme-light .index-pill--active,
.theme-light .index-pill--active:hover { background: var(--light-black); color: var(--white); }
.theme-light .guide-card { border-color: var(--light-black); color: var(--light-black); }
.theme-light .guide-card--filled { background: transparent; }   /* Figma: bordered only */
.theme-light .guide-card__num,
.theme-light .guide-card__intro,
.theme-light .guide-step__title,
.theme-light .guide-step p,
.theme-light .guide-step__caption,
.theme-light .guide-note,
.theme-light .guide-note strong,
.theme-light .guide-prereqs li,
.theme-light .guide-checks li { color: var(--light-black); }
.theme-light .guide-step__fig { border: 1px solid #d9d9d9; }

/* ===== Demo modal (shared light/dark) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(1, 18, 28, .6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  background: var(--white);
  color: var(--text-dark);
  border-radius: 22px;
  width: 100%;
  max-width: 554px;
  padding: 60px 68px;
  margin: auto;
}
.modal__close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 30px;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
}
.modal__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-dark);
  margin: 0 0 28px;
}
.modal-form { display: flex; flex-direction: column; gap: 18px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; }
.modal-field label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-dark);
}
.modal-field input,
.modal-field textarea {
  font-family: "Outfit", var(--font-body);
  font-size: 16px;
  color: var(--text-dark);
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 11px 19px;
  width: 100%;
  background: var(--white);
}
.modal-field input { height: 45px; }
.modal-field textarea { height: 194px; resize: vertical; }
.modal-field input::placeholder,
.modal-field textarea::placeholder { color: #99a1af; }
.modal-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
}
.modal-check input {
  width: 24px;
  height: 24px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  accent-color: var(--btn);
  flex-shrink: 0;
}
.modal-check label {
  font-family: var(--font-body);
  font-size: 14px;
  color: #000;
}
.modal-form .btn { align-self: flex-start; min-width: 241px; height: 58px; }
.modal-status {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0;
}
.modal-status.ok  { color: #0f5132; background: #d1e7dd; border: 1px solid #a3cfbb; }
.modal-status.err { color: #842029; background: #f8d7da; border: 1px solid #f1aeb5; }
.modal-status.pending { color: #084298; background: #cfe2ff; border: 1px solid #9ec5fe; }
.modal-field.invalid input,
.modal-field.invalid textarea { border-color: #dc3545; }
.modal-check.invalid input { outline: 2px solid #dc3545; }
.modal-check.invalid label { color: #dc3545; }

@media (max-width: 560px) {
  .modal { padding: 48px 28px; }
  /* tighten the header on phones so logo + actions never overflow */
  .brand-logo { width: 170px; height: 38px; }
  .header-actions { gap: 10px; }
}
