/*
 * Inner pages v18 (Our Work, Guides, Privacy): hand rules for the converted block markup, after the generated design
 * rules (pg-v18-port.css). Source: design/claude/pages/ (components/v18-shell.jsx, pages/OurWork.jsx, Guides.jsx,
 * Legal.jsx, res-visual.jsx; styles/site.css, pages.css, inner-v18.css, our-work-v18.css, res-visual.css).
 * Scoped to .dgn-v18-pg, the page wrapper group.
 */

.dgn-v18-pg.wp-block-group { color: var(--fg-primary); background: var(--bg-canvas); }
.dgn-v18-pg :where(figure.wp-block-image, .wp-block-buttons, h1, h2, h3, h4) { margin: 0; }
.dgn-v18-pg :where(figure.wp-block-image) img { display: block; }

/* a card that was one link: the title link covers the whole card */
.dgn-v18-pg .a-card { position: relative; cursor: pointer; }
.dgn-v18-pg .a-main a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dgn-v18-pg .a-card:has(.a-main a:focus-visible) { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
.dgn-v18-pg .a-main a:focus-visible { outline: none; }

/* Our Work: the industry filter pills are buttons (home-v18.js); a card the filter hides */
.dgn-v18-pg .ow-pill { cursor: pointer; }
.dgn-v18-pg .ow-pill:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.dgn-v18-pg .ow-card[hidden] { display: none !important; }

/* resources visual: the chapter progress ring (the design's SVG of two circles: 4px track, blue arc to 60%) */
@property --dg-ring { syntax: "<number>"; inherits: false; initial-value: 60; }
.dgn-v18-pg .rsv-ring.x {
	flex: none; display: block; width: 44px; height: 44px; border-radius: 50%;
	background: conic-gradient(var(--brand-blue, #2051F9) calc(var(--dg-ring) * 1%), #E6E9F1 0);
	-webkit-mask: radial-gradient(circle, transparent 15.4px, #000 15.5px, #000 19.7px, transparent 19.8px);
	mask: radial-gradient(circle, transparent 15.4px, #000 15.5px, #000 19.7px, transparent 19.8px);
	animation: dgPgRing 7.5s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes dgPgRing { 0% { --dg-ring: 0; } 55%, 100% { --dg-ring: 60; } }
@media (prefers-reduced-motion: reduce) { .dgn-v18-pg .rsv-ring.x { animation: none; } }

/* dark mode: sections the design leaves white take the dark canvas */
html[data-theme="dark"] .dgn-v18-pg > section:not(#_d1):not(#_d2):not(#_d3):not(#_d4):not(#_d5):not(#_d6):not(#_d7):not(#_d8):not(#_d9):not(#_d10) { background: var(--bg-canvas) !important; }

/* editor: one-time load animations show at once */
.editor-styles-wrapper .dgn-v18-pg :is(.v18i-rv, .rsv *) { opacity: 1 !important; transform: none !important; animation: none !important; }

/* Our Work: a pill with no projects (home-v18.js sets aria-disabled, as the design disables the button) */
.dgn-v18-pg .ow-pill[aria-disabled="true"] { opacity: .4; cursor: default; }
.dgn-v18-pg .ow-pill[aria-disabled="true"]:hover { color: var(--fg-secondary); background: transparent; }
.dgn-v18-pg .ow-grid[hidden] { display: none !important; }

/* Privacy: each policy part is a <section>; the home rule "body.v18 section:not(...)" (80px, 64px on phones; !important, up to seven
   ids) would apply to it too. The design: 24px above, 12px below. */
.dgn-v18-pg section.legal-block:not(#_l1):not(#_l2):not(#_l3):not(#_l4):not(#_l5):not(#_l6):not(#_l7):not(#_l8) { padding: 24px 0 12px !important; }

/* the design's page-level section padding (home-v12/16/17.css "main>section:not(#top)...", no page class, so not
   extracted): 100px top and bottom, 64px up to 760px wide; restated over the home "body.v18 section" rules. Our Work's
   sections (ow-*) have their own, stronger design rules. */
.dgn-v18-pg > section:not(#top):not([class*="ow-"]):not(#_s1):not(#_s2):not(#_s3):not(#_s4):not(#_s5):not(#_s6):not(#_s7):not(#_s8) { padding-top: 100px !important; padding-bottom: 100px !important; }
@media (max-width: 760px) { .dgn-v18-pg > section:not(#top):not([class*="ow-"]):not(#_s1):not(#_s2):not(#_s3):not(#_s4):not(#_s5):not(#_s6):not(#_s7):not(#_s8) { padding-top: 64px !important; padding-bottom: 64px !important; } }

/* Work bug sheet (tester's expected result): on phones and tablets, where the sidebar drops under the article, the
   "Your turn" card is followed by a 32px gap (was 80: the card's 40px margin plus the 40px row gap) */
@media (max-width: 1100px) {
	.dgn-v18-pg .ed-main > .ed-cta-card:last-child:not(#_a) { margin-bottom: 0; }
	.dgn-v18-pg .ed-layout:not(#_a) { row-gap: 32px; }
}

/* Work bug sheet BUG_006: the tab row's right fade (design) drops once the row is scrolled to its end (home-v18.js) */
.dgn-v18-pg .ow-pills.is-end:not(#_a) { -webkit-mask: none; mask: none; }
/* Work bug sheet BUG_013: on phones and tablets the case study ends 40px under the sidebar (was 96px) before Get in touch */
@media (max-width: 1100px) {
	.dgn-v18-pg .ed-body:not(#_a) { padding-bottom: 40px !important; }
}

/* Work tab row: room above and below the scroll row so the selected tab's shadow is not cut off (the row keeps its
   place: the extra padding is taken back with negative margins) */
.dgn-v18-pg .ow-pills:not(#_a) { padding-top: 8px; padding-bottom: 16px; margin-top: -8px; margin-bottom: -16px; }

/* Case Studies bug sheet */
/* BUG_002: a click on a moving client logo no longer starts a native image drag (which stopped the strip and shook it) */
.dgn-v18-pg .ow-logos img { -webkit-user-drag: none; user-select: none; }
/* BUG_003: while the active tab is hovered (grey), its count badge keeps readable dark text instead of white */
@media (hover: hover) and (pointer: fine) {
	.dgn-v18-pg .ow-pill.on:not([aria-disabled="true"]):not(.just-on):hover :is(em, .em):not(#_a) { background: rgba(11, 13, 18, .06); color: var(--fg-muted); }
}
/* BUG_008: once the tab row is scrolled, its left edge fades too, so no half-cut tab or stray count shows there */
.dgn-v18-pg .ow-pills.is-scrolled:not(#_a):not(#_b) { -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.dgn-v18-pg .ow-pills.is-scrolled.is-end:not(#_a):not(#_b) { -webkit-mask: linear-gradient(90deg, transparent, #000 8%); mask: linear-gradient(90deg, transparent, #000 8%); }
/* BUG_009 / BUG_011: the "06 projects" count stays in the tab bar on tablets and phones */
@media (max-width: 900px) {
	.dgn-v18-pg .ow-cnt:not(#_a) { display: flex; padding: 0 12px 0 10px; }
}
/* BUG_006: the card image (inside its figure) fills the whole 4:3 frame, with no grey band under it */
.dgn-v18-pg .ow-img > figure:not(#_a) { height: 100%; margin: 0; }
.dgn-v18-pg .ow-img > figure img:not(#_a) { display: block; height: 100%; }
/* BUG_007: the grid card of the featured project (marked "ow-feat" for the filter) no longer takes the dark featured
   block's styles; it is an ordinary card like the others */
.dgn-v18-pg .ow-grid > .ow-card.ow-feat:not(#_a) { display: flex; min-height: 0; border-radius: 0; overflow: visible; background: none; color: inherit; }
/* BUG_012: share buttons no longer jump 1px up on hover (the pointer at their edge fell off and back on, so they blinked) */
.dgn-v18-pg .bp-share-btn:hover:not(#_a) { transform: none; }
/* BUG_013: the "Start a project" button reacts on hover (the whole card is the link): white turns light blue, arrow moves */
.dgn-v18-pg .ed-cta-card-btn:not(#_a) { transition: gap 180ms, background 200ms, box-shadow 200ms; }
.dgn-v18-pg .ed-cta-card:hover .ed-cta-card-btn:not(#_a) { gap: 12px; background: #EEF2FF; box-shadow: 0 10px 24px -10px rgba(7, 8, 10, .45); }
/* BUG_015: on tablets the button stays on the right of the card's text, as on desktop */
@media (min-width: 600px) {
	.dgn-v18-pg .ed-cta-card:not(#_a) { flex-wrap: nowrap; }
	.dgn-v18-pg .ed-cta-card > .ed-cta-card-text { flex: 1 1 auto; min-width: 0; }
	.dgn-v18-pg .ed-cta-card > .ed-cta-card-btn { flex: none; }
}
/* BUG_014: on phones "Back to all work" and the industry tag sit on one line (a tag too long for the width still wraps under it, never off the screen) */
@media (max-width: 599px) {
	.dgn-v18-pg .ed-head-top:not(#_a) { flex-wrap: wrap; gap: 10px 8px; }
	.dgn-v18-pg .ed-head-top > * { flex: none; white-space: nowrap; }
	.dgn-v18-pg .ed-head-top > .ed-eyebrow:not(#_a) { min-width: 0; padding-left: 10px; padding-right: 10px; letter-spacing: .06em; font-size: 9.5px; }
	.dgn-v18-pg .ed-head-top > .ed-back:not(#_a) { font-size: 13px; }
}

/* Guides (Resources bug sheet BUG_002-004): on tablet the hero card stack sits on the right, as on desktop, and on
   tablet and phone the first guides section starts closer to the hero (the hero already ends with 40px) */
@media (max-width: 1023px) {
	.dgn-v18-pg .page-hero .page-hero-visual > .rsv:not(#_a):not(#_b) { margin-left: auto !important; margin-right: 0 !important; }
	.dgn-v18-pg > .page-hero + section.section:not(#top):not([class*="ow-"]):not(#_s1):not(#_s2):not(#_s3):not(#_s4):not(#_s5):not(#_s6):not(#_s7):not(#_s8):not(#_s9) { padding-top: 24px !important; }
}
