/* Kingdom — working desktop layout. Contenuti reali (screenshot + copy) da integrare in un pass successivo. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  color-scheme: dark;
  background: #000;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #000;
  text-shadow:
    0 0.2rem 0.55rem rgb(0 0 0 / 94%),
    0 0.55rem 1.25rem rgb(0 0 0 / 72%);
}

.kingdom-page-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  background-color: #000;
  background-image: url("../assets/backgrounds/kingdom page desk.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.kingdom-home-link {
  display: none;
}

.kingdom-disclaimer {
  display: none;
}

@media (min-width: 48.001rem) {
  .kingdom-home-link {
    position: fixed;
    z-index: 10;
    top: 1.45rem;
    left: 1.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.35rem;
    padding: 0.48rem 0.82rem;
    border: 1px solid rgb(190 205 255 / 28%);
    border-radius: 0.42rem;
    color: rgb(243 246 255 / 92%);
    background: rgb(10 8 18 / 54%);
    box-shadow:
      0 0.45rem 1rem rgb(0 0 0 / 24%),
      inset 0 0 0 1px rgb(129 105 255 / 8%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
    transition:
      background-color 160ms ease,
      border-color 160ms ease,
      transform 160ms ease,
      box-shadow 160ms ease;
  }

  .kingdom-home-link:hover {
    border-color: rgb(199 217 255 / 46%);
    background: rgb(18 13 31 / 66%);
    box-shadow:
      0 0.55rem 1.2rem rgb(0 0 0 / 30%),
      0 0 0.9rem rgb(115 88 255 / 12%),
      inset 0 0 0 1px rgb(154 129 255 / 13%);
    transform: translateY(-1px);
  }

  .kingdom-home-link:focus-visible {
    outline: 2px solid rgb(203 220 255 / 78%);
    outline-offset: 3px;
  }


  .kingdom-disclaimer {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 0.8rem;
    display: block;
    width: min(calc(100vw - 12rem), 58rem);
    margin: 0;
    color: rgb(220 211 229 / 62%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(0.66rem, 0.6rem + 0.12vw, 0.75rem);
    line-height: 1.45;
    text-align: center;
    text-shadow:
      0 0.15rem 0.45rem rgb(0 0 0 / 96%),
      0 0.45rem 1rem rgb(0 0 0 / 82%);
    transform: translateX(-50%);
    pointer-events: none;
  }

  .kingdom-page-section--feature {
    display: grid;
    align-items: center;
  }

  /* Fascia Kingdom costruita con asset grafico dedicato: banda viola in trasparenza con disintegrazione progressiva verso destra. */
  .kingdom-feature-band {
    position: relative;
    width: 100%;
    min-height: clamp(24rem, 54vh, 36rem);
    isolation: isolate;
    display: grid;
    align-items: center;
  }

  .kingdom-feature-band::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: url("../assets/images/kingdom-dissolution-band-v2.png");
    background-position: calc(0% - 8rem) center;
    background-repeat: no-repeat;
    background-size: min(92vw, 84rem) auto;
    filter: drop-shadow(0 1rem 2.2rem rgb(0 0 0 / 24%));
    opacity: 0.98;
  }

  .kingdom-band-fragments {
    display: none;
  }

  .kingdom-feature-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    width: min(100%, 96rem);
    min-height: clamp(24rem, 54vh, 36rem);
    margin-inline: auto;
    padding: clamp(2.4rem, 4vw, 4.5rem) clamp(2.5rem, 6vw, 7rem);
    gap: clamp(3rem, 7vw, 7.5rem);
  }

  .kingdom-feature-inner--hero {
    align-content: center;
  }

  .kingdom-screenshot-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 16rem;
    margin: 0;
    border-radius: 0.92rem;
    overflow: hidden;
    background: rgb(8 4 14 / 76%);
    border: 1px solid rgb(200 145 255 / 68%);
    box-shadow:
      0 1.4rem 3rem rgb(0 0 0 / 34%),
      0 0 1.55rem rgb(146 88 255 / 28%),
      inset 0 0 0 1px rgb(232 216 255 / 15%);
  }

  .kingdom-screenshot-frame--hero {
    width: 80%;
    justify-self: start;
    transform: translateX(-10%) perspective(1600px) rotateY(-22deg) rotateZ(-1deg);
    transform-origin: center left;
  }

  .kingdom-screenshot-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }


  .kingdom-feature-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.15rem;
    max-width: 36rem;
    color: rgb(255 255 255 / 94%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-shadow:
      0 0.2rem 0.55rem rgb(0 0 0 / 96%),
      0 0.6rem 1.35rem rgb(0 0 0 / 78%),
      0 0 1.1rem rgb(74 22 104 / 34%);
  }

  .kingdom-feature-copy p {
    margin: 0;
  }

  .kingdom-feature-copy-lead {
    font-size: clamp(1.35rem, 1.05rem + 1.1vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
  }

  .kingdom-feature-copy-body {
    font-size: clamp(1rem, 0.94rem + 0.35vw, 1.2rem);
    font-weight: 400;
    line-height: 1.6;
    color: rgb(245 241 250 / 90%);
  }

  .kingdom-screenshot-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 16rem;
    border: 1px dashed rgb(246 239 255 / 46%);
    border-radius: 0.72rem;
    color: rgb(255 250 255 / 64%);
    background:
      linear-gradient(145deg, rgb(255 255 255 / 8%), transparent 42%),
      rgb(21 10 31 / 48%);
    box-shadow:
      0 1.2rem 2.8rem rgb(0 0 0 / 28%),
      inset 0 0 0 1px rgb(255 255 255 / 5%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(0.78rem, 0.9vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-align: center;
  }

  .kingdom-copy-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
    min-width: 0;
    padding-right: clamp(0rem, 3vw, 2.5rem);
  }

  .kingdom-copy-placeholder-line {
    display: block;
    width: 76%;
    height: clamp(0.78rem, 1vw, 1rem);
    border-radius: 999px;
    background: rgb(255 250 255 / 54%);
    box-shadow: 0 0.25rem 0.8rem rgb(42 9 74 / 15%);
  }

  .kingdom-copy-placeholder-line--lead {
    width: 56%;
    height: clamp(1.2rem, 1.55vw, 1.48rem);
    margin-bottom: 0.45rem;
    background: rgb(255 253 255 / 80%);
  }

  .kingdom-copy-placeholder-line--wide {
    width: 88%;
  }

  .kingdom-copy-placeholder-line--short {
    width: 48%;
  }

  .kingdom-page-section--cta {
    background: transparent;
  }

  .kingdom-get-button {
    min-width: 11.5rem;
  }
}

.kingdom-cta-stack {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.kingdom-legal-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.12rem 0.2rem;
  color: rgb(232 220 246 / 76%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.035em;
  text-decoration: underline;
  text-decoration-color: rgb(186 134 241 / 42%);
  text-underline-offset: 0.24rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.kingdom-legal-link:hover {
  color: #fff;
  text-decoration-color: rgb(218 180 255 / 88%);
}

.kingdom-legal-link:focus-visible {
  outline: 2px solid rgb(203 164 255 / 88%);
  outline-offset: 4px;
  border-radius: 0.2rem;
}



/* Kingdom — modal download. */
.kingdom-download-modal[hidden] {
  display: none;
}

.kingdom-download-modal {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.kingdom-download-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 68%);
  backdrop-filter: blur(9px) saturate(112%);
  -webkit-backdrop-filter: blur(9px) saturate(112%);
}

.kingdom-download-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 36rem);
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid rgb(186 124 255 / 34%);
  border-radius: 1.15rem;
  color: #fff;
  background:
    linear-gradient(145deg, rgb(103 42 139 / 13%), transparent 42%),
    rgb(20 7 29 / 96%);
  box-shadow:
    0 1.8rem 5rem rgb(0 0 0 / 56%),
    0 0 2.4rem rgb(123 64 194 / 22%),
    inset 0 1px 0 rgb(255 255 255 / 7%);
}

.kingdom-download-close {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid rgb(196 151 255 / 26%);
  border-radius: 0.7rem;
  color: rgb(255 255 255 / 82%);
  background: rgb(8 3 13 / 52%);
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
}

.kingdom-download-close:hover {
  border-color: rgb(208 166 255 / 50%);
  color: #fff;
  background: rgb(69 26 96 / 48%);
}

.kingdom-download-title {
  margin: 0 2.6rem 1.8rem 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 1.25rem + 1vw, 2.1rem);
  line-height: 1.16;
  font-weight: 800;
  color: rgb(255 255 255 / 97%);
}

.kingdom-download-options {
  display: grid;
  gap: 0.85rem;
}

.kingdom-download-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgb(190 142 255 / 20%);
  border-radius: 0.85rem;
  color: rgb(248 244 255 / 93%);
  background: rgb(34 13 47 / 72%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.kingdom-download-option:not([aria-disabled="true"]):hover {
  border-color: rgb(205 163 255 / 42%);
  background: rgb(54 20 75 / 84%);
  box-shadow:
    0 0 1.15rem rgb(128 70 199 / 18%),
    inset 0 1px 0 rgb(255 255 255 / 6%);
  transform: translateX(2px);
}

.kingdom-download-option[aria-disabled="true"] {
  cursor: default;
  border-style: dashed;
  color: rgb(224 211 238 / 93%);
  background: rgb(23 13 31 / 86%);
}

.kingdom-download-label {
  display: grid;
  gap: 0.2rem;
}

.kingdom-download-unavailable {
  color: #c8b6d8;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
}

.kingdom-download-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  color: rgb(224 200 255 / 92%);
  filter: drop-shadow(0 0 0.7rem rgb(155 87 230 / 26%));
}

.kingdom-download-close:focus-visible,
.kingdom-download-option:focus-visible {
  outline: 2px solid rgb(199 153 255 / 86%);
  outline-offset: 3px;
}

body.kingdom-download-open .service-section-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.kingdom-download-open {
  overflow: hidden;
}

/* Il mobile di Kingdom resta intenzionalmente fuori da questo pass desktop. */
@media (max-width: 48rem) {
  .kingdom-section-viewport,
  .service-section-nav {
    display: none !important;
  }

  .kingdom-home-link {
    position: fixed;
    z-index: 10;
    top: max(0.85rem, env(safe-area-inset-top));
    left: max(0.85rem, env(safe-area-inset-left));
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.35rem;
    padding: 0.48rem 0.82rem;
    border: 1px solid rgb(190 205 255 / 28%);
    border-radius: 0.42rem;
    color: rgb(243 246 255 / 92%);
    background: rgb(10 8 18 / 58%);
    box-shadow:
      0 0.45rem 1rem rgb(0 0 0 / 24%),
      inset 0 0 0 1px rgb(129 105 255 / 8%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
  }

  .kingdom-home-link:focus-visible {
    outline: 2px solid rgb(203 220 255 / 78%);
    outline-offset: 3px;
  }

  .kingdom-page-background {
    background-image: url("../assets/backgrounds/kingdom page mobile.png");
  }
}
