/* Solo il contorno: l'editor originale conserva codice e stili nel suo iframe. */
.letterhead-demo { container: letterhead-demo / inline-size; width: 100%; margin-top: 4rem; scroll-margin-top: 6rem; }
.letterhead-demo-heading { margin-bottom: 1.75rem; text-align: center; }
.letterhead-demo-heading .eyebrow { margin-bottom: .75rem; }
.letterhead-demo-heading h3 { color: var(--color-text); font-size: clamp(1.625rem, 3vw, 2.125rem); line-height: 1.2; letter-spacing: -.035em; }
.letterhead-demo-heading > p { max-width: 42rem; margin: .875rem auto 0; color: var(--color-text-secondary); font-size: .9375rem; line-height: 1.65; }
.letterhead-demo-desktop { display: none; }
.letterhead-demo-window { overflow: hidden; border: 1px solid #dfe3e9; border-radius: 16px; background: #fff; box-shadow: 0 14px 40px rgba(16,27,77,.07); }
.letterhead-demo-macbar { display: flex; align-items: center; gap: .5rem; height: 2.625rem; box-sizing: border-box; padding: 0 1.125rem; border-bottom: 1px solid #e2e4e8; background: linear-gradient(#fbfbfc, #f3f3f5); }
.letterhead-demo-macbar span { width: .75rem; height: .75rem; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.letterhead-demo-macbar span:nth-child(2) { background: #febc2e; }
.letterhead-demo-macbar span:nth-child(3) { background: #28c840; }
.letterhead-demo-frame { display: block; width: 100%; height: min(86vh, 53.75rem); min-height: 38.75rem; box-sizing: border-box; border: 0; background: #fff; }
.letterhead-demo-mobile { overflow: hidden; max-width: 36rem; margin-inline: auto; border: 1px solid #dfe5ee; border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(16,27,77,.04); }
.letterhead-demo-mobile-preview { position: relative; max-height: 19rem; overflow: hidden; padding: 1.25rem 1.25rem 0; background: #eef2f8; }
.letterhead-demo-mobile-preview::after { content: ""; position: absolute; inset: auto 0 0; height: 2.5rem; background: linear-gradient(transparent, #eef2f8); pointer-events: none; }
.letterhead-demo-mobile-preview img { display: block; width: 100%; max-width: 27rem; height: auto; margin: auto; box-shadow: 0 8px 24px rgba(16,27,77,.1); }
.letterhead-demo-mobile-copy { padding: 1.5rem; text-align: center; }
.letterhead-demo-mobile-copy h4 { color: var(--color-text); font-size: 1.125rem; line-height: 1.4; }
.letterhead-demo-mobile-copy p { margin-top: .625rem; color: var(--color-text-secondary); font-size: .875rem; line-height: 1.65; }
.letterhead-demo-mobile-copy .btn { display: flex; gap: .5rem; min-height: 48px; margin-top: 1.25rem; padding-inline: 1rem; font-size: .8125rem; }
.letterhead-demo-mobile-copy .btn:focus-visible { outline: 2px solid #627daf; outline-offset: 4px; }
.letterhead-demo-standalone { margin: 0; background: #f3f4f7; }
.letterhead-demo-standalone .letterhead-demo-window { min-width: 900px; height: 100vh; height: 100dvh; min-height: 602px; display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; }
.letterhead-demo-standalone .letterhead-demo-macbar { flex-shrink: 0; }
.letterhead-demo-standalone .letterhead-demo-frame { flex: 1; height: 0; min-height: 560px; }
/* Conta lo spazio effettivo nella sezione, non la sola larghezza dello schermo. */
@container letterhead-demo (min-width: 900px) {
  .letterhead-demo-desktop { display: block; }
  .letterhead-demo-mobile { display: none; }
}
@supports not (container-type: inline-size) {
  @media (min-width: 960px) {
    .letterhead-demo-desktop { display: block; }
    .letterhead-demo-mobile { display: none; }
  }
}
@media (max-width: 768px) {
  .letterhead-demo { width: 100%; margin-left: 0; transform: none; margin-top: 2.5rem; }
  .letterhead-demo-heading { margin-bottom: 1.5rem; }
  .letterhead-demo-heading > p { font-size: .875rem; }
  .letterhead-demo-mobile-copy { padding: 1.25rem 1rem; }
}
