
/* Vital SEO — original animated SEO ROI artwork */

.service-vector-hero .roi-hero-art {
    background: transparent;
}

.service-vector-hero .roi-hero-art::before {
    display: none;
}

.roi-scene {
    --roi-accent: #168bce;
    --roi-positive: #07866e;
    --roi-grid: rgba(35, 95, 145, .13);
    --roi-surface: rgba(255, 255, 255, .94);
    --roi-ink: #17344d;
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 1.65;
    overflow: hidden;
    border-radius: 22px;
    background: radial-gradient(
        ellipse at 65% 40%,
        rgba(36, 151, 213, .12),
        transparent 70%
    );
}

.roi-grid {
    position: absolute;
    inset: 12% 5%;
    background-image:
        linear-gradient(var(--roi-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--roi-grid) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse, black 20%, transparent 78%);
    animation: roi-grid-motion 12s linear infinite;
}

.roi-sweep {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg, transparent 35%,
        rgba(52, 165, 229, .12) 50%,
        transparent 65%
    );
    animation: roi-sweep-motion 7s ease-in-out infinite;
}

.roi-chart {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 20%;
    bottom: 16%;
    border-left: 1px solid var(--roi-grid);
    border-bottom: 1px solid var(--roi-grid);
}

.roi-bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 5%;
}

.roi-bars i {
    display: block;
    width: 10%;
    height: var(--h);
    border-radius: 5px 5px 0 0;
    background: linear-gradient(
        0deg,
        rgba(22, 139, 206, .12),
        var(--roi-accent)
    );
    opacity: .75;
    transform-origin: bottom;
    animation: roi-bar-motion 4.5s ease-in-out infinite;
    animation-delay: var(--d);
}

.roi-trend {
    position: absolute;
    inset: 0 7% 0 5%;
}

.roi-trend i {
    position: absolute;
    left: var(--x);
    bottom: var(--y);
    width: var(--w);
    height: 3px;
    border-radius: 3px;
    background: var(--roi-positive);
    transform: rotate(var(--a));
    transform-origin: left center;
    box-shadow: 0 0 12px rgba(25, 181, 150, .28);
}

.roi-trend i::before {
    content: "";
    position: absolute;
    left: -3px;
    top: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--roi-positive);
    animation: roi-point-motion 2.8s ease-in-out infinite;
}

.roi-floating {
    position: absolute;
    z-index: 2;
    padding: 11px 15px;
    border: 1px solid var(--roi-grid);
    border-radius: 12px;
    background: var(--roi-surface);
    color: var(--roi-ink);
    box-shadow: 0 8px 24px rgba(10, 40, 70, .09);
    animation: roi-float-motion 5s ease-in-out infinite;
}

.roi-floating small {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}

.roi-floating strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(18px, 2.3vw, 27px);
    color: var(--roi-positive);
}

.roi-floating-return {
    top: 7%;
    right: 4%;
}

.roi-floating-growth {
    top: 23%;
    left: 3%;
    animation-delay: -1.7s;
}

.roi-floating-value {
    bottom: 5%;
    right: 12%;
    animation-delay: -3.2s;
}

@keyframes roi-bar-motion {
    0%, 100% { transform: scaleY(.88); }
    50% { transform: scaleY(1); }
}

@keyframes roi-float-motion {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes roi-point-motion {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 0 6px rgba(25,181,150,.15); }
}

@keyframes roi-grid-motion {
    from { background-position: 0 0; }
    to { background-position: 32px 32px; }
}

@keyframes roi-sweep-motion {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

html[data-theme="dark"] .roi-scene {
    --roi-accent: #399df2;
    --roi-positive: #65dbbb;
    --roi-grid: rgba(140, 190, 230, .15);
    --roi-surface: rgba(19, 42, 63, .95);
    --roi-ink: #dcebf8;
}

.roi-panel [hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .roi-scene {
        min-height: 220px;
    }
}

@media (max-width: 700px) {
    .service-vector-hero .roi-hero-art {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .roi-scene *,
    .roi-scene *::before,
    .roi-scene *::after {
        animation: none !important;
    }
}


/* SEO ROI — calculator workspace */

.roi-panel {
    --roi-card: #ffffff;
    --roi-field: #f7f9fc;
    --roi-border: #dce5ee;
    --roi-text: #17344d;
    --roi-muted: #53687d;
    --roi-blue: #176fc1;
    --roi-green: #087b60;
    --roi-negative: #b42318;
}

html[data-theme="dark"] .roi-panel {
    --roi-card: #172d43;
    --roi-field: #102337;
    --roi-border: #36506a;
    --roi-text: #e5effa;
    --roi-muted: #b4c8dc;
    --roi-blue: #83bdff;
    --roi-green: #65dbbb;
    --roi-negative: #ffaaa5;
}

.roi-standard-workspace > .roi-workspace-heading {
    margin: 0 0 24px;
}

.roi-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.roi-controls,
.roi-results,
.roi-analysis {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--roi-border);
    border-radius: 16px;
    background: var(--roi-card);
    color: var(--roi-text);
}

.roi-controls h3,
.roi-results h3,
.roi-analysis h3 {
    margin: 0 0 20px;
}

.roi-controls h4,
.roi-report-controls h4 {
    margin: 22px 0 14px;
    color: var(--roi-text);
}

.roi-panel label {
    display: grid;
    gap: 7px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--roi-text);
}

.roi-panel input,
.roi-panel select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--roi-border);
    border-radius: 8px;
    background: var(--roi-field);
    color: var(--roi-text);
    font: inherit;
    font-weight: 400;
}

.roi-panel input:focus-visible,
.roi-panel select:focus-visible,
.roi-panel button:focus-visible,
.roi-panel summary:focus-visible {
    outline: 2px solid var(--roi-blue);
    outline-offset: 3px;
}

.roi-fields,
.roi-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.roi-help {
    font-size: 13px;
    line-height: 1.55;
    color: var(--roi-muted);
}

.roi-advanced {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--roi-border);
    border-radius: 10px;
}

.roi-advanced summary {
    cursor: pointer;
    font-weight: 600;
}

.roi-advanced[open] summary {
    margin-bottom: 16px;
}

.roi-result {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--roi-border);
    border-radius: 10px;
    background: var(--roi-field);
}

.roi-result span {
    display: block;
    font-size: 12px;
    color: var(--roi-muted);
}

.roi-result strong {
    display: block;
    margin-top: 7px;
    font-size: clamp(16px, 1.5vw, 22px);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.roi-result-primary {
    margin-bottom: 12px;
    padding: 20px;
}

.roi-result-primary strong {
    font-size: clamp(32px, 4vw, 46px);
    color: var(--roi-green);
}

.roi-result strong[data-negative="true"] {
    color: var(--roi-negative);
}

.roi-report-controls {
    margin-top: 18px;
    border-top: 1px solid var(--roi-border);
}

.roi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.roi-actions button {
    flex: 1 1 130px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.roi-primary {
    background: #176fc1;
    color: #ffffff;
}

.roi-secondary {
    background: var(--roi-field);
    color: var(--roi-text);
    border-color: var(--roi-border) !important;
}

.roi-actions button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

#roi-error {
    color: var(--roi-negative);
    font-size: 14px;
}

.roi-analysis {
    margin-top: 24px;
}

.roi-table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.roi-analysis table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.roi-analysis th,
.roi-analysis td {
    padding: 12px;
    border-bottom: 1px solid var(--roi-border);
    text-align: right;
    white-space: nowrap;
}

.roi-analysis th:first-child,
.roi-analysis td:first-child {
    text-align: left;
}

.roi-analysis th {
    background: var(--roi-field);
}

@media (min-width: 901px) and (min-height: 800px) {
    .roi-results {
        position: sticky;
        top: 110px;
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }
}

@media (max-width: 900px) {
    .roi-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .roi-controls,
    .roi-results,
    .roi-analysis {
        padding: 16px;
    }

    .roi-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}


/* SEO ROI — artwork visual refinement */
@media (min-width: 701px) {
    .service-vector-hero .roi-hero-art .roi-scene {
        width: 80%;
        max-width: 100%;
        min-height: 0;
        height: auto;
        aspect-ratio: 1.85;
        margin-inline: auto;
    }

    .roi-floating-value {
        bottom: 9%;
    }
}


/* SEO ROI calculator — local report customisation */

.roi-report-controls [hidden] {
    display: none !important;
}

.roi-report-controls input[type="file"] {
    max-width: 100%;
    min-width: 0;
    font-size: 13px;
}

.roi-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 12px;
    margin: 12px 0 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 10px;
}

.roi-logo-preview img {
    display: block;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.roi-report-controls input[type="range"] {
    width: 100%;
    min-height: 28px;
    padding: 0;
    accent-color: #176fc1;
    cursor: pointer;
}

.roi-logo-remove {
    padding: 8px 12px;
    border: 1px solid var(--roi-border);
    border-radius: 8px;
    background: var(--roi-card);
    color: var(--roi-text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

#roi-report-status:empty {
    display: none;
}

#roi-report-status[data-error="true"] {
    color: var(--roi-negative);
}


/* SEO ROI — professional PDF branding preview */

.roi-brand-header {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 16px;
    margin: 10px 0 18px;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    background: #fff;
    color: #17344d;
}

.roi-brand-identity {
    min-width: 0;
    overflow-wrap: anywhere;
}

.roi-brand-header .roi-logo-preview {
    justify-content: flex-start;
    height: 60px;
    padding: 0;
    margin: 0 0 5px;
    border: 0;
    border-radius: 0;
}

#roi-slogan-preview,
#roi-website-preview {
    font-size: 11px;
    line-height: 1.5;
}

#roi-slogan-preview {
    color: #536779;
}

#roi-website-preview {
    color: #176fc1;
}

#roi-slogan-preview:empty,
#roi-website-preview:empty {
    display: none;
}

.roi-brand-report-type {
    display: grid;
    gap: 5px;
    text-align: right;
    color: #536779;
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.roi-report-controls #roi-pdf {
    flex: 1 1 100%;
}


/* SEO ROI — centred branding and optional report date */

.roi-brand-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.roi-brand-header .roi-logo-preview {
    width: 100%;
    justify-content: center;
}

#roi-slogan-preview,
#roi-website-preview {
    width: 100%;
    text-align: center;
}

.roi-report-date-controls {
    margin: 14px 0;
}

.roi-report-date-toggle {
    display: flex !important;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.roi-report-date-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: #176fc1;
}

#roi-report-date-field {
    margin-top: 10px;
}

#roi-report-date {
    width: 100%;
    box-sizing: border-box;
}

#roi-brand-date {
    margin-top: 3px;
}
