/* ==================================================
   SERVICE ART: the six drawings in My Services (index.html)
   Each tile's media is a small artboard: the soft gray plate the
   site's other media cells use (#f5f5f5), a dot grid like a design
   canvas, the site's hairline frame. The drawing itself is an SVG
   (assets/services/<name>.svg), shown first as a picture and swapped
   for the same SVG inline by js/service-art.js, which builds it line
   by line on arrival.
   ================================================== */

.rido-capabilities .rido-capability-grid__media--art {
    background-color: #f5f5f5;
    background-image: radial-gradient(circle at center, rgba(10, 10, 10, 0.14) 0 0.8px, transparent 1.15px);
    background-size: 16px 16px;
    background-position: 8px 8px;
    contain: paint;
}

/* The media frame every cell on the site wears: an ink hairline
   outside, a faint white one inside. */
.rido-capabilities .rido-capability-grid__media--art::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid var(--hairline, rgba(10, 10, 10, 0.14));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.svc-art {
    position: absolute;
    inset: 0;
}

.svc-art > img,
.svc-art > svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    overflow: hidden;
}

/* The picture already shows the finished drawing; the tile's own
   hover zoom (rido-editorial-sections.css) would blur its hairlines. */
.rido-capabilities .rido-capability-grid__tile:hover .svc-art img,
.rido-capabilities .rido-capability-grid__tile:focus-within .svc-art img {
    transform: none;
}

/* ==================================================
   PRINCIPLE ART: the hidden drawings in the four principle cards
   (01 Mission to 04 Cause, homepage My Services). A band between
   the title and the copy holds assets/principles/<name>.svg; the
   same script (js/service-art.js, scenes `pr-*`) swaps it inline
   and leaves the band empty at rest; a hover, a focus or a finger
   held on the card draws the pencil and inks its story. No plate:
   the drawing sits on the card itself, so the cards stay quiet
   until they are asked for.
   ================================================== */

.rido-principles .rido-principles__art {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    pointer-events: none;
}

/* Guides run past the drawing to the band's edges. */
.rido-principles .pr-art > svg {
    overflow: visible;
}

/* With motion the band stays empty until the card is asked for (the
   script draws the pencil in then); the picture, the finished
   drawing, is the still for reduced motion, no script, or a failed
   fetch. */
html[data-motion="full"] .rido-principles .pr-art > img {
    visibility: hidden;
}

html[data-motion="full"] .rido-principles .pr-art.is-picture > img {
    visibility: visible;
}

/* Phones: one card a row, so a wider, shorter band (the drawing
   fits whole in its middle, its guides run to the edges). */
@media (max-width: 767px) {
    .rido-principles .rido-principles__art {
        aspect-ratio: 2.3 / 1;
    }
}

/* Tablet and up: the band takes the room between title and copy. */
@media (min-width: 768px) {
    .rido-principles .rido-principles__item {
        grid-template-rows: auto auto 1fr auto;
    }

    .rido-principles .rido-principles__art {
        align-self: center;
    }
}
