/* The page types share the header grid, reading measure and contact panel. */
.editorial-page {
    --ice: #eff4f8;
    --peach: #fff1e7;
    --stroke: #dce1e4;
    --ink: #111d23;
    --accent: #ff5900;
    --link-orange: #ac3900;
    --reading-width: min(1060px, var(--nex-inner-width));
    --arc: radial-gradient(ellipse 58% 165% at 115% 168%, #fce9dc 0 76%, transparent 76.3%),
           radial-gradient(ellipse 62% 160% at 115% 138%, #fef4ec 0 75%, transparent 75.3%);
    color: var(--ink);
}
.editorial-page .page-content-shell { width: 100%; max-width: none; }
.editorial-page .inherited-section { width: var(--nex-inner-width); }
.editorial-page :is(h1,h2,h3) { line-height: 1.12; letter-spacing: -.045em; }
.editorial-page .nxb-text-block__content > :last-child { margin-bottom: 0; }
.editorial-page .nxb-text-block__content > :first-child { margin-top: 0; }
.editorial-page .nxb-text-block__content { color: var(--ink); }
.editorial-page p { line-height: 1.6; }
.editorial-page .inherited-cta, .project-story .nex-case-detail:has(a[href="/contact/"]) {
    width: var(--nex-inner-width); margin: clamp(30px,4vw,60px) auto; background: var(--peach);
    border-radius: 16px; padding: clamp(22px,3.5vw,52px); box-sizing: border-box;
}
.editorial-page .inherited-cta :is(.nxb-text-block__inner,.nxb-text-block__content),
.project-story .nex-case-detail:has(a[href="/contact/"]) .nxb-text-block__inner { width: 100%; max-width: none; }
.editorial-page .inherited-cta .source-kicker { margin: 0 0 8px; font-size: 1rem; letter-spacing: 0; font-weight: 750; }
.editorial-page .inherited-cta h2, .project-story .nex-case-detail:has(a[href="/contact/"]) h2 { margin: 0 0 8px; font-size: clamp(1.9rem,3.3vw,3rem); }
.editorial-page .inherited-cta a, .project-story .nex-case-detail a[href="/contact/"] {
    display: inline-flex; justify-content: center; align-items: center; min-height: 44px; min-width: 140px;
    padding: 10px 22px; border-radius: 7px; background: #bc4200; color: #fff; text-decoration: none; font-weight: 750;
}
.editorial-page .inherited-cta a:hover, .project-story .nex-case-detail a[href="/contact/"]:hover { background: #963400; }
.editorial-page .inherited-cta p { max-width: 72ch; margin: 0 0 14px; }
.editorial-page .directory-icon { width: 26px; height: 26px; flex: none; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.editorial-page a:focus-visible { outline: 3px solid #ca4600; outline-offset: 3px; }

/* Services directory */
.services-index .nxb-section:has(.directory-opening,.directory-reviews,.company-reviews) { background: var(--ice); }
.services-index .directory-opening { margin-block: 0; padding-bottom: clamp(24px,4vw,60px); background: transparent; }
.directory-hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: stretch; min-height: clamp(230px,24vw,355px); }
.directory-intro { align-self: center; padding-block: 36px; }
.services-index .directory-intro h1 { margin: 0 0 14px; font-size: clamp(2.8rem,5vw,5rem); }
.directory-intro h1 span { color: var(--accent); }
.services-index .directory-intro p { max-width: 43ch; margin: 0; font-size: 1.075rem; }
.directory-screens { position: relative; width: 100%; aspect-ratio: 1.85; align-self: center; overflow: clip; isolation: isolate; }
.directory-screens::before, .directory-screens::after { content: ""; position: absolute; border-radius: 50%; aspect-ratio: 1; width: 49%; top: 6%; right: 4%; background: var(--accent); }
.directory-screens::after { transform: scale(1.1); background: transparent; border: 1px solid #ff590032; }
.directory-window { position: absolute; z-index: 1; overflow: hidden; background: #fff; border: 5px solid #fff; border-radius: 9px; box-shadow: 0 8px 23px #141d2530; transform: rotate(-8deg); }
.directory-window::before { content: "•••"; display: block; padding-left: 6px; height: 12px; color: #a6acae; background: #f1f3f3; font: bold 10px/10px sans-serif; letter-spacing: 2px; }
.directory-window:nth-child(1) { left: 4%; top: 40%; width: 40%; }
.directory-window:nth-child(2) { left: 21%; top: 10%; width: 45%; }
.directory-window:nth-child(3) { right: 5%; top: 26%; width: 51%; transform: rotate(7deg); }
.services-index .directory-window img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.services-index .directory-opening .source-project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: clamp(14px,2vw,28px); margin: clamp(26px,4vw,60px) 0 0; }
.services-index .directory-opening .source-project-grid > a { padding: clamp(10px,1vw,16px); background: #fff; border: 1px solid var(--stroke); border-radius: 12px; color: var(--ink); }
.services-index .directory-opening .source-project-grid > a:is(:hover,:focus-visible) { border-color: var(--accent); background: #fffaf6; }
.directory-card-media { display: block; }
.services-index .directory-card-media img { display: block; width: 100%; aspect-ratio: 1.85; height: auto; object-fit: contain; object-position: center; border-radius: 7px; }
@media (prefers-reduced-motion: no-preference) {
    .services-index :is(.directory-screens,.directory-card-media) { animation: var(--nex-image-entry); }
    .services-index .directory-card-media.awaiting-entry { animation: none; opacity: 0; transform: translateY(18px); }
    .services-index .directory-card-media img { transition: transform .25s ease; }
    .services-index .source-project-grid > a:focus-visible .directory-card-media img { transform: translateY(-5px); }
    @media (hover: hover) {
        .services-index .source-project-grid > a:hover .directory-card-media img { transform: translateY(-5px); }
    }
}
.services-index .directory-opening .source-project-grid h3 { display: flex; align-items: center; gap: 10px; margin: 13px 0 5px; font-size: clamp(1.12rem,1.65vw,1.5rem); }
.services-index .directory-opening .source-project-grid h3::after, .directory-areas a::after { content: "→"; font-size: 1.25rem; margin-left: auto; color: var(--link-orange); }
.services-index .directory-opening .source-project-grid p { margin: 0 3px; line-height: 1.5; }
.services-index .directory-copy { margin-block: clamp(25px,4vw,54px); }
.services-index .directory-copy p { max-width: none; }
.directory-copy .nxb-text-block__content::before, .insight-index :is(.insight-masthead h1,.insight-index-heading h2)::after,
.insight-story .article-heading::after, .insight-story :is(.article-prose,.article-notes) h2::after,
.project-story .nxb-section:has(+ .nxb-section > .nxb-gallery) .nex-case-detail h2::after {
    content: ""; display: block; width: 54px; height: 4px; margin-block: 14px 20px; background: var(--accent); border-radius: 2px;
}
.services-index .directory-reviews { background: transparent; margin-block: 0; padding-top: clamp(22px,3vw,42px); }
.services-index .directory-reviews h2 { font-size: clamp(1.65rem,2.7vw,2.5rem); }
.services-index .company-reviews { width: var(--nex-inner-width); max-width: none; margin: 0 auto; padding: 12px 0 32px; background: transparent; }
.services-index .reviews-access { display: flex; align-items: center; flex-wrap: wrap; gap: 12px clamp(20px,3vw,40px); justify-content: center; padding-top: 18px; text-align: center; }
.services-index .reviews-access :is(a,button) { margin: 0; padding: 0; border: 0; background: transparent; color: var(--link-orange); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.services-index .reviews-access a::after { content: " →"; }
.services-index .directory-areas .agency-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 clamp(20px,4vw,52px); max-width: none; padding: 0; list-style: none; }
.services-index .directory-areas li { margin: 0; }
.services-index .directory-areas .agency-links a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--stroke); border-radius: 0; background: transparent; color: var(--ink); font-weight: 650; text-decoration: none; }
.directory-areas a:hover { text-decoration: underline; }

/* Blog and article mastheads */
.insight-index,.project-story { border-top: 3px solid var(--accent); }
.insight-index .nxb-section:has(.insight-masthead) { background: var(--arc),white; border-bottom: 1px solid var(--stroke); }
.insight-index .insight-masthead { margin-block: 0; background: transparent; padding-block: clamp(35px,4.5vw,70px); }
.insight-index .insight-masthead h1, .insight-story .article-heading h1, .project-story .nxb-banner__title {
    font-size: clamp(2.4rem,4.45vw,4.5rem); letter-spacing: -.055em; line-height: 1.04;
}
.insight-index .insight-masthead h2 { font-size: clamp(1.5rem,2.4vw,2.3rem); margin: 20px 0 8px; }
.insight-index .insight-masthead p { margin: 10px 0 0; max-width: 68ch; }
.insight-index .insight-masthead .nxb-text-block__content > p:first-child, .article-heading > p:first-child { font-weight: 750; color: var(--link-orange); margin: 0 0 14px; }
.insight-index .insight-index-heading { margin: clamp(30px,4vw,54px) auto 24px; }
.insight-index .source-collection { margin: 0 auto; }
.insight-index .source-project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(16px,2vw,28px); }
.insight-index .source-project { max-width: none; border: 1px solid var(--stroke); background: white; border-radius: 12px; }
.insight-index .source-project > a { display: flex; flex-direction: column; padding: 14px; border: 0; }
.insight-index .source-project:has(a:is(:hover,:focus-visible)) { border-color: var(--link-orange); }
.insight-index .source-project img { width: 100%; height: auto; aspect-ratio: 1.55; object-fit: cover; border-radius: 7px; margin: 0; }
.insight-card-copy { display: flex; flex: 1; flex-direction: column; padding: 12px 6px 5px; }
.insight-index .insight-card-copy p { line-height: 1.5; margin: 4px 0 10px; }
.insight-index .insight-card-copy p:first-child { color: var(--link-orange); font-size: .9rem; font-weight: 750; }
.insight-card-copy p:first-child strong { display: table; padding: .1rem .5rem; margin-bottom: .35rem; border-radius: 4px; color: white; background: #b74000; }
.insight-index .insight-card-copy h3 { margin: 0; font-size: clamp(1.25rem,2vw,1.8rem); }
.insight-read { display: block; margin-top: auto; padding-top: 12px; font-weight: 750; }
.insight-index .source-project:last-child:nth-child(3n+1):not(:first-child) { grid-column: 1 / -1; }
.insight-index .source-project:last-child:nth-child(3n+1):not(:first-child) > a { display: grid; grid-template-columns: 40% minmax(0,1fr); align-items: center; gap: clamp(16px,3vw,46px); }
.insight-index .insight-browse { text-align: center; margin: 28px auto; }
.insight-browse p { margin-inline: auto; }
.insight-browse a, .project-story .nxb-banner__intro a[href*="/releases"] { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 20px; border: 1px solid var(--link-orange); border-radius: 6px; color: var(--link-orange); text-decoration: none; font-weight: 750; }
.insight-browse a:hover,.project-story .nxb-banner__intro a:hover { background: var(--peach); }
.insight-story .article-opening { width: 100%; margin: 0; padding: 0; }
.insight-story .article-opening :is(.nxb-text-block__inner,.nxb-text-block__content) { width: 100%; max-width: none; padding: 0; }
.article-heading { text-align: center; background: var(--arc),#f8fafb; padding: clamp(32px,4.3vw,62px) 20px 20px; }
.insight-story .article-heading h1 { max-width: 21ch; margin: 0 auto 12px; }
.insight-story .article-heading > p { margin-inline: auto; }
.insight-story .article-heading::after { margin: 17px auto 0; }
.insight-story .article-opening img { display: block; width: min(600px,85%); max-height: 405px; object-fit: contain; height: auto; margin: clamp(20px,3vw,42px) auto; border-radius: 8px; }
.insight-story :is(.article-prose,.article-notes,.inherited-cta) { width: var(--reading-width); margin-inline: auto; }
.insight-story :is(.article-prose,.article-notes) { padding: 0; margin-block: 24px; }
.insight-story :is(.article-prose,.article-notes) :is(.nxb-text-block__content,.nxb-text-block__inner) { width: 100%; max-width: none; }
.insight-story .article-prose p,.insight-story .article-notes p { font-size: 1.075rem; margin: 0 0 14px; max-width: none; }
.insight-story :is(.article-prose,.article-notes) h2 { margin: 34px 0 12px; font-size: clamp(1.5rem,2.5vw,2.35rem); }
.insight-story :is(.article-prose,.article-notes) h2::after { margin: 7px 0 0; width: 46px; height: 3px; }
.insight-story blockquote { margin: 20px 0; padding: 16px 24px; border-left: 5px solid var(--accent); background: var(--peach); border-radius: 6px; font-style: italic; font-weight: 650; }
.dns-examples { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; background: #f3f5f6; border-radius: 8px; padding: 18px 22px; margin: 20px 0; }
.dns-example { display: grid; grid-template-columns: 36px minmax(0,1fr); column-gap: 12px; align-content: start; }
.dns-example + .dns-example { padding-left: 18px; border-left: 1px solid var(--stroke); }
.dns-example svg { grid-row: 1 / 4; }
.insight-story .dns-example :is(h3,p) { margin: 0; font-size: .95rem; line-height: 1.5; }
.insight-story .article-prose ol { counter-reset: checks; padding-left: 0; list-style: none; max-width: none; }
.article-prose ol > li { counter-increment: checks; position: relative; padding-left: 44px; margin-block: 14px; }
.article-prose ol > li::before { content: counter(checks); position: absolute; left: 0; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 5px; background: #bc4200; color: white; font-weight: 750; }
.article-prose ol > li > strong:first-child { display: block; }
.insight-story .article-facts br { display: none; }
.insight-story .article-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 30px; }
.article-facts dt { font-weight: 750; }
.article-facts dd { margin: 0; }
.insight-story .article-prose img,.insight-story .article-notes img { max-width: 100%; height: auto; }


/* Portfolio case studies keep their editable feature cards, gallery and project facts. */
.project-story { background: white; }
.project-story .nxb-section:has(> .nxb-editorial-hero) { position: relative; isolation: isolate; }
.project-story .nxb-section:has(> .nxb-editorial-hero)::before { content: ""; position: absolute; z-index: -1; inset: 0 calc((100% - 100vw) / 2); background: var(--arc); }
.project-story { overflow-x: clip; }
.project-story .nxb-banner__title { font-size: clamp(2.4rem,3.7vw,3.6rem); }
.project-story .umb-block-list {
    width: var(--nex-inner-width); margin: 0 auto;
    display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); column-gap: clamp(24px,4vw,64px);
}
.project-story .umb-block-list > .nxb-section { grid-column: 1 / -1; min-width: 0; }
.project-story .nxb-editorial-hero { width: 100%; max-width: none; margin: 0; padding-block: clamp(32px,4.5vw,70px); background: transparent; }
.project-story .nxb-banner__layout { grid-template-columns: minmax(0,.83fr) minmax(0,1.17fr); column-gap: clamp(24px,4vw,62px); align-items: center; }
.project-story .nxb-editorial-hero .nxb-banner__content { padding: 0; text-align: left; }
.project-story .nxb-banner__eyebrow { font-weight: 750; margin: 0 0 17px; }
.project-story .nxb-banner__intro { font-size: 1.045rem; line-height: 1.6; }
.project-story .nxb-banner__intro h2 { margin: 0 0 18px; font-size: clamp(1.3rem,2.2vw,2rem); }
.project-story .nxb-banner__intro p { margin: 14px 0 0; }
.project-story .nxb-banner__intro a[href*="/releases"]::after { content: "→"; }
.project-story .nxb-banner__media, .project-story .nxb-gallery__link { display: block; border: 6px solid #f0f2f2; border-radius: 12px; overflow: hidden; }
.project-story .nxb-banner__image, .project-story .nxb-gallery__image { display: block; width: 100%; height: auto; object-fit: contain; border-radius: 5px; }
.project-story .nex-case-cards { width: 100%; margin: 0; padding: 0; }
.project-story .nxb-simple-pods__grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px,1.4vw,22px); }
.project-story .nxb-simple-pods__card { background: #fafafa; border: 1px solid var(--stroke); border-radius: 11px; box-shadow: 0 2px 7px #10212d06; }
.project-story .nxb-simple-pods__content { padding: clamp(16px,1.65vw,24px); }
.project-story .nxb-simple-pods__heading { font-size: clamp(1.12rem,1.65vw,1.45rem); letter-spacing: -.04em; line-height: 1.14; }
.project-story .nxb-simple-pods__text { margin-top: 8px; color: #35424a; }
.project-story .nxb-simple-pods__text p { font-size: .96rem; line-height: 1.55; }
.project-story .nxb-section:has(> .nex-case-detail):has(+ .nxb-section > .nxb-gallery) { grid-column: 1; align-self: center; }
.project-story .nxb-section:has(> .nex-case-detail) + .nxb-section:has(> .nxb-gallery) { grid-column: 2; align-self: center; }
.project-story .nxb-gallery, .project-story .nex-case-detail { width: 100%; margin: 0; padding-block: clamp(30px,4vw,64px); }
.project-story .nex-case-detail .nxb-text-block__inner { width: 100%; max-width: none; }
.project-story .nex-case-detail h2 { margin: 0 0 14px; font-size: clamp(1.7rem,3vw,2.8rem); }
.project-story .nxb-gallery__viewport { grid-template-columns: minmax(0,1fr); }
.project-story .nxb-gallery__link, .project-story .nxb-gallery__image { aspect-ratio: auto; }
.project-story .nex-case-detail:has(a[href="/contact/"]) { width: 100%; margin-block: clamp(24px,3.3vw,48px); }
.project-story .nex-case-detail:has(a[href="/contact/"]) p { margin: 0; }
.project-story .nex-case-detail:has(a[href="/contact/"]) .nxb-text-block__content > p:first-child { margin: 0 0 8px; font-size: .78rem; font-weight: 750; letter-spacing: .08em; }
@media (min-width: 801px) {
    .editorial-page .inherited-cta .nxb-text-block__content,
    .project-story .nex-case-detail:has(a[href="/contact/"]) .nxb-text-block__content {
        display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: clamp(24px,4vw,66px);
    }
    .editorial-page .inherited-cta .nxb-text-block__content > *,
    .project-story .nex-case-detail:has(a[href="/contact/"]) .nxb-text-block__content > * { grid-column: 1; }
    .editorial-page .inherited-cta .nxb-text-block__content > p:last-child,
    .project-story .nex-case-detail:has(a[href="/contact/"]) .nxb-text-block__content > p:last-child { grid-column: 2; grid-row: 1 / 4; align-self: center; }
}
@media (max-width: 900px) {
    .services-index .directory-opening .source-project-grid, .project-story .nxb-simple-pods__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .services-index .directory-areas .agency-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .insight-index .source-project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .insight-index .source-project:last-child:nth-child(3n+1):not(:first-child) { grid-column: auto; }
    .insight-index .source-project:last-child:nth-child(3n+1):not(:first-child) > a { display: flex; align-items: stretch; gap: 0; }
}
@media (max-width: 800px) {
    .project-story .nxb-banner__layout { grid-template-columns: 1fr; gap: 22px; }
    .project-story .nxb-editorial-hero .nxb-banner__content, .project-story .nxb-editorial-hero .nxb-banner__media { grid-column: 1; grid-row: auto; }
    .project-story .nxb-editorial-hero .nxb-banner__media { min-height: 0; }
    .project-story .nxb-section:has(> .nex-case-detail):has(+ .nxb-section > .nxb-gallery),
    .project-story .nxb-section:has(> .nex-case-detail) + .nxb-section:has(> .nxb-gallery) { grid-column: 1 / -1; }
    .project-story .nxb-gallery { padding-top: 0; }
    .project-story .nex-case-detail a[href="/contact/"] { margin-top: 15px; }
}
@media (max-width: 600px) {
    .directory-hero, .services-index .directory-opening .source-project-grid, .services-index .directory-areas .agency-links,
    .insight-index .source-project-grid, .project-story .nxb-simple-pods__grid, .dns-examples { grid-template-columns: 1fr; }
    .directory-intro { padding: 28px 0 0; }
    .directory-screens { margin-top: 12px; }
    .services-index .directory-opening .source-project-grid { margin-top: 20px; }
    .insight-story .article-facts dl { grid-template-columns: 1fr; gap: 0; }
    .article-facts dd { margin-bottom: 8px; }
    .dns-example + .dns-example { border-left: 0; border-top: 1px solid var(--stroke); padding: 16px 0 0; }
}
