/* Brand identity — grafiche CSS (no screenshot builder) */

body.body-stage-brand-identity .stage-bi-graphic {
    --bi-primary: var(--color-primary-500, #136ef5);
    --bi-primary-soft: var(--color-primary-25, #e7f0fe);
    --bi-accent: #a855f7;
    --bi-accent-soft: #f3e8ff;
    --bi-sand: #eee4d7;
    --bi-lime: #e9efbf;
    --bi-rose: #f5d5d8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: var(--bi-primary-soft);
    box-sizing: border-box;
}

body.body-stage-brand-identity .stage-bi-graphic--path-card,
body.body-stage-brand-identity .stage-bi-graphic--row-media,
body.body-stage-brand-identity .stage-bi-graphic--hero-stack {
    border-radius: clamp(0.75rem, 2vw, 1.25rem);
    min-height: clamp(14rem, 42vw, 22rem);
    aspect-ratio: 16 / 10;
}

body.body-stage-brand-identity .stage-design-path-card__media .stage-bi-graphic--path-card {
    min-height: clamp(11rem, 28vw, 16rem);
    border-radius: inherit;
}

body.body-stage-brand-identity .stage-realization-row__media .stage-bi-graphic--row-media {
    width: 100%;
    min-height: clamp(14rem, 32vw, 22rem);
}

body.body-stage-brand-identity .stage-design-use-card__text code {
    font-size: 0.88em;
    font-family: ui-monospace, monospace;
}

body.body-stage-brand-identity .stage-realization-row__text code {
    font-size: 0.92em;
    font-family: ui-monospace, monospace;
}

body.body-stage-brand-identity .stage-bi-graphic__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 15% 18%, rgba(168, 85, 247, 0.14), transparent 52%),
        radial-gradient(ellipse 65% 48% at 88% 78%, rgba(19, 110, 245, 0.16), transparent 48%),
        linear-gradient(155deg, var(--bi-primary-soft) 0%, #fff 72%);
    pointer-events: none;
}

body.body-stage-brand-identity .stage-bi-graphic__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 30rem;
    padding: clamp(1rem, 3vw, 1.75rem);
}

/* Hero board */
body.body-stage-brand-identity .stage-bi-graphic__hero-board {
    display: grid;
    grid-template-columns: minmax(5.5rem, 28%) 1fr;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    border-radius: 0.55rem;
    background: var(--color-secondary-50, #f7f7f7);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-sidebar-title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-secondary-500, #737373);
}

body.body-stage-brand-identity .stage-bi-graphic__swatch {
    display: block;
    height: 1.35rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.body-stage-brand-identity .stage-bi-graphic__swatch--primary { background: var(--bi-primary); }
body.body-stage-brand-identity .stage-bi-graphic__swatch--accent { background: var(--bi-accent); }
body.body-stage-brand-identity .stage-bi-graphic__swatch--neutral { background: #282828; }

body.body-stage-brand-identity .stage-bi-graphic__type-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.5rem;
    border-radius: 0.35rem;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-secondary-800, #282828);
}

body.body-stage-brand-identity .stage-bi-graphic__type-row--lg {
    font-size: 0.95rem;
    color: var(--bi-primary);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-canvas {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    border-radius: 0.55rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-nav {
    display: block;
    width: 55%;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--color-secondary-100, #ececec);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-headline {
    display: block;
    width: 88%;
    height: 0.65rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bi-primary), #6366f1);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-sub {
    display: block;
    width: 72%;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--color-secondary-150, #e0e0e0);
}

body.body-stage-brand-identity .stage-bi-graphic__hero-btn {
    display: block;
    width: 38%;
    height: 0.85rem;
    margin-top: 0.15rem;
    border-radius: 999px;
    background: var(--bi-primary);
}

/* Define panel */
body.body-stage-brand-identity .stage-bi-graphic__panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    text-align: left;
}

body.body-stage-brand-identity .stage-bi-graphic__panel-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary-500, #737373);
    margin-bottom: 0.15rem;
}

body.body-stage-brand-identity .stage-bi-graphic__panel-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-secondary-800, #282828);
}

body.body-stage-brand-identity .stage-bi-graphic__dot {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.3rem;
    flex-shrink: 0;
}

body.body-stage-brand-identity .stage-bi-graphic__dot--1 { background: var(--bi-primary); }
body.body-stage-brand-identity .stage-bi-graphic__dot--2 { background: var(--bi-accent); }
body.body-stage-brand-identity .stage-bi-graphic__dot--3 { background: #282828; }

body.body-stage-brand-identity .stage-bi-graphic__panel-font {
    padding: 0.45rem 0.6rem;
    border-radius: 0.45rem;
    background: var(--bi-lime);
    font-size: 0.72rem;
    font-weight: 600;
}

body.body-stage-brand-identity .stage-bi-graphic__panel-font--body {
    background: var(--bi-sand);
}

/* Apply */
body.body-stage-brand-identity .stage-bi-graphic--apply .stage-bi-graphic__content {
    flex-direction: column;
    gap: 0.75rem;
}

body.body-stage-brand-identity .stage-bi-graphic__blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    width: 100%;
}

body.body-stage-brand-identity .stage-bi-graphic__block {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 4.5rem;
    padding: 0.45rem;
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    font-size: 0.62rem;
    font-weight: 700;
    font-style: normal;
    color: var(--color-secondary-500, #737373);
}

body.body-stage-brand-identity .stage-bi-graphic__block--hero {
    background: linear-gradient(160deg, var(--bi-primary-soft), #fff);
    border: 1px solid rgba(19, 110, 245, 0.15);
}

body.body-stage-brand-identity .stage-bi-graphic__block--cta {
    background: var(--bi-primary);
    color: #fff;
}

body.body-stage-brand-identity .stage-bi-graphic__token-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #282828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.02em;
}

/* Sync pages */
body.body-stage-brand-identity .stage-bi-graphic__pages {
    display: flex;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.body-stage-brand-identity .stage-bi-graphic__page {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    animation: stage-bi-page-pulse 2.8s ease-in-out infinite;
    animation-delay: calc(var(--bi-delay, 1) * 0.25s);
}

body.body-stage-brand-identity .stage-bi-graphic__page-bar {
    display: block;
    height: 0.35rem;
    width: 70%;
    border-radius: 999px;
    background: var(--bi-primary);
}

body.body-stage-brand-identity .stage-bi-graphic__page-body {
    display: block;
    flex: 1;
    min-height: 2.5rem;
    border-radius: 0.35rem;
    background: var(--bi-primary-soft);
}

body.body-stage-brand-identity .stage-bi-graphic__page em {
    font-size: 0.62rem;
    font-weight: 700;
    font-style: normal;
    color: var(--color-secondary-500, #737373);
}

@keyframes stage-bi-page-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Publish live */
body.body-stage-brand-identity .stage-bi-graphic__live {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

body.body-stage-brand-identity .stage-bi-graphic__live-url {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    color: var(--color-secondary-500, #737373);
}

body.body-stage-brand-identity .stage-bi-graphic__live-url i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #22c55e;
}

body.body-stage-brand-identity .stage-bi-graphic__live-url strong {
    margin-left: auto;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.58rem;
    font-weight: 700;
}

body.body-stage-brand-identity .stage-bi-graphic__live-brand {
    display: block;
    height: 2.25rem;
    border-radius: 0.45rem;
    background: linear-gradient(90deg, var(--bi-primary), var(--bi-accent));
}

body.body-stage-brand-identity .stage-bi-graphic__live-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

body.body-stage-brand-identity .stage-bi-graphic__live-row span {
    display: block;
    height: 1.75rem;
    border-radius: 0.35rem;
    background: var(--bi-primary-soft);
}

/* Palette detail */
body.body-stage-brand-identity .stage-bi-graphic__palette {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    width: 100%;
}

body.body-stage-brand-identity .stage-bi-graphic__palette-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem;
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

body.body-stage-brand-identity .stage-bi-graphic__palette-item i {
    display: block;
    height: 2rem;
    border-radius: 0.4rem;
}

body.body-stage-brand-identity .stage-bi-graphic__palette-item--primary i { background: var(--bi-primary); }
body.body-stage-brand-identity .stage-bi-graphic__palette-item--accent i { background: var(--bi-accent); }
body.body-stage-brand-identity .stage-bi-graphic__palette-item--surface i { background: var(--bi-primary-soft); }
body.body-stage-brand-identity .stage-bi-graphic__palette-item--text i { background: #282828; }

body.body-stage-brand-identity .stage-bi-graphic__palette-item em {
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    color: var(--color-secondary-600, #525252);
}

/* Typography */
body.body-stage-brand-identity .stage-bi-graphic__type-scale {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    padding: 1rem;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09);
    text-align: left;
}

body.body-stage-brand-identity .stage-bi-graphic__type-h {
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    font-weight: 700;
    color: var(--bi-primary);
    line-height: 1.2;
}

body.body-stage-brand-identity .stage-bi-graphic__type-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secondary-800, #282828);
}

body.body-stage-brand-identity .stage-bi-graphic__type-p {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--color-secondary-500, #737373);
}

body.body-stage-brand-identity .stage-bi-graphic__type-caption {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary-400, #818181);
}

/* Tokens flow */
body.body-stage-brand-identity .stage-bi-graphic__token-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
}

body.body-stage-brand-identity .stage-bi-graphic__token-node {
    padding: 0.4rem 0.65rem;
    border-radius: 0.45rem;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    color: var(--color-secondary-700, #404040);
}

body.body-stage-brand-identity .stage-bi-graphic__token-node--root {
    background: var(--bi-primary);
    color: #fff;
    font-family: inherit;
}

body.body-stage-brand-identity .stage-bi-graphic__token-arrow {
    width: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--bi-primary), var(--bi-accent));
    border-radius: 999px;
}

/* CTA scene */
body.body-stage-brand-identity .stage-bi-graphic__cta-scene {
    position: relative;
    width: 100%;
    min-height: 11rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.body-stage-brand-identity .stage-bi-graphic__cta-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(19, 110, 245, 0.2);
}

body.body-stage-brand-identity .stage-bi-graphic__cta-ring--1 {
    width: 88%;
    height: 88%;
    animation: stage-bi-ring-spin 18s linear infinite;
}

body.body-stage-brand-identity .stage-bi-graphic__cta-ring--2 {
    width: 62%;
    height: 62%;
    border-color: rgba(168, 85, 247, 0.22);
    animation: stage-bi-ring-spin 14s linear infinite reverse;
}

@keyframes stage-bi-ring-spin {
    to { transform: rotate(360deg); }
}

body.body-stage-brand-identity .stage-bi-graphic__cta-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: min(100%, 14rem);
    padding: 1.1rem 1rem;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    text-align: center;
}

body.body-stage-brand-identity .stage-bi-graphic__cta-logo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, var(--bi-primary), var(--bi-accent));
}

body.body-stage-brand-identity .stage-bi-graphic__cta-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-secondary-800, #282828);
}

body.body-stage-brand-identity .stage-bi-graphic__cta-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--bi-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Hero stack (palette + pannello brand) */
body.body-stage-brand-identity .stage-realization-hero--brand .stage-realization-hero__media {
    display: flex;
    align-items: stretch;
}

body.body-stage-brand-identity .stage-realization-hero--brand .stage-realization-hero__media--stack {
    overflow: visible;
}

body.body-stage-brand-identity .stage-realization-hero--brand .stage-realization-hero__media-stack {
    position: relative;
    width: 100%;
    padding-top: clamp(1.25rem, 3.5vw, 2rem);
    padding-left: clamp(1.5rem, 5vw, 2.75rem);
}

body.body-stage-brand-identity .stage-bi-hero-stack__base {
    position: relative;
    z-index: 1;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    border-radius: clamp(0.75rem, 2vw, 1.25rem);
    overflow: hidden;
}

body.body-stage-brand-identity .stage-bi-hero-stack__float {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: clamp(7.5rem, 34%, 11.5rem);
    border-radius: var(--radius-sm, 0.5rem);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    animation: stage-bi-hero-float-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

body.body-stage-brand-identity .stage-bi-graphic--hero-float {
    min-height: auto;
    aspect-ratio: auto;
    min-height: clamp(8rem, 22vw, 11rem);
}

@keyframes stage-bi-hero-float-in {
    from {
        opacity: 0;
        transform: translate(14px, 14px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

body.body-stage-brand-identity .stage-design-path-card__media {
    overflow: hidden;
}

body.body-stage-brand-identity .stage-interactions-cta__media .stage-bi-graphic {
    min-height: clamp(16rem, 38vw, 24rem);
    border-radius: clamp(0.75rem, 2vw, 1.25rem);
}

@media (prefers-reduced-motion: reduce) {
    body.body-stage-brand-identity .stage-bi-graphic__page,
    body.body-stage-brand-identity .stage-bi-graphic__cta-ring,
    body.body-stage-brand-identity .stage-bi-hero-stack__float {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
