/* ============================================================
   V5 Tide, inner pages: the homepage's language, section by section.
   Sections are tagged at build time (tools/v5/design/_inner.py):
   v5-hero, v5-proof, v5-faq, v5-rel, v5-close, v5-cont (same background as the one before),
   v5-h2 (a section's main heading), v5-ruled (icon cards), v5-steps (numbered cards), v5-ico (icon box).
   ============================================================ */

/* rhythm: every content section breathes the same; a section on the same colour as the last one continues it */
main :where(.v5-sec:not(.v5-hero,.v5-proof,.v5-close,.relw)){padding-top:clamp(88px,10vw,152px)!important;padding-bottom:clamp(88px,10vw,152px)!important}
main :where(.v5-sec.v5-cont:not(.relw)){padding-top:0!important}

/* headings: one scale for every section */
.v5-h2{font-size:clamp(32px,4.2vw,56px)!important;line-height:1.02!important;letter-spacing:-.04em!important;font-weight:650!important;text-wrap:balance}
.v5-faq .v5-h2{font-size:clamp(30px,3.4vw,46px)!important}

/* hero: homepage-sized headline, the photo with the same soft corners and no frame */
.v5-hero h1{font-size:clamp(38px,3.9vw,60px)!important;line-height:.98!important;letter-spacing:-.05em!important;font-weight:700!important;text-wrap:balance}
.v5-hero .hero2>div:last-child,.v5-hero .xfade,.v5-hero .heroimg,.v5-hero .heroframe{border-radius:28px!important;border:0!important;overflow:hidden}

/* icon cards become a ruled list: a line, a small icon, the title and a sentence */
.v5-ruled{row-gap:clamp(36px,4vw,56px)!important;column-gap:clamp(28px,3.4vw,52px)!important}
html body main section .v5-ruled.v5-ruled.v5-ruled>*,html body main section .v5-ruled.v5-ruled.v5-ruled>[style]{background:transparent!important;border:0!important;border-top:1px solid #dfe5e4!important;border-radius:0!important;padding:24px 0 0!important;box-shadow:none!important}
.v5-ruled .v5-ico{width:auto!important;height:auto!important;background:none!important;margin:0 0 14px!important;justify-content:flex-start!important;color:#106a74!important;border-radius:0!important}
.v5-ruled .v5-ico svg{width:22px;height:22px}
.v5-ruled h3{font-size:20px!important;letter-spacing:-.02em!important;font-weight:650!important;line-height:1.2!important}

/* numbered cards become steps on a line */
.v5-steps{position:relative;--secbg:#f4f6f6}
section[style*="background:#ffffff"] .v5-steps{--secbg:#fff}
html body main section .v5-steps.v5-steps.v5-steps>*,html body main section .v5-steps.v5-steps.v5-steps>[style]{background:transparent!important;border:0!important;padding:0!important;border-radius:0!important;box-shadow:none!important;position:relative}
.v5-steps>*>div:first-child{width:48px;height:48px;border-radius:50%;background:#106a74;color:#fff!important;font-size:15px!important;font-weight:650!important;letter-spacing:0!important;line-height:1!important;display:grid;place-items:center;position:relative;z-index:1;box-shadow:0 0 0 10px var(--secbg)}
.v5-steps>* h3{font-size:22px!important;font-weight:650!important;letter-spacing:-.025em!important;margin-top:22px!important}
@media(min-width:901px){.v5-steps::before{content:"";position:absolute;left:0;right:0;top:23px;height:2px;background:#d6dfde}}

/* work like this: the homepage's work cards */
.relw.v5-sec{background:#fff!important}
.relw .relw-ph{aspect-ratio:4/3!important;border-radius:22px!important}
.relw .relw-lab{font-size:13px!important;color:#5d6967!important;margin:16px 0 6px!important}
.relw h3{font-size:21px!important;letter-spacing:-.025em!important;font-weight:650!important}
.relw .relw-res{color:#55615f!important}

/* closing invitation: left aligned over its photo, like the homepage contact */
.v5-close>div[style*="position:absolute"][style*="gradient"]{background:linear-gradient(90deg,rgba(15,58,64,.96) 0%,rgba(15,58,64,.88) 36%,rgba(15,58,64,.45) 72%,rgba(15,58,64,.25) 100%)!important}
.v5-close .wrap{text-align:left!important}
.v5-close h2{margin-left:0!important;margin-right:0!important;max-width:15ch!important}
.v5-close p{margin-left:0!important;margin-right:0!important;max-width:46ch!important;text-wrap:pretty!important}
.v5-close .wrap>div{justify-content:flex-start!important}
.v5-close span[style*="color:#8fe6d3"]{color:#f2b01e!important}

/* long headlines a step smaller */
.v5-hero h1.v5-long{font-size:clamp(36px,3.9vw,60px)!important}

/* stat row under the hero: numbers on a ruled line */
.v5-stats .wrap{padding-top:clamp(56px,7vw,104px)!important;padding-bottom:clamp(40px,5vw,72px)!important}
.v5-stats .wrap>div{border-top:1px solid #dfe5e4;padding-top:22px}
.v5-stats .wrap>div>div:first-child{font-weight:650!important;letter-spacing:-.04em!important;font-size:clamp(36px,4.2vw,58px)!important}
main [style*="font-weight:800"][style*="color:#106a74"][style*="line-height:1"]{font-weight:650!important;letter-spacing:-.04em!important}

/* other icon-card grids that become ruled lists */
html body main section .covers.covers>.ci,html body main section .trio.trio.trio>*,html body main section .trio.trio.trio>[style]{background:transparent!important;border:0!important;border-top:1px solid #dfe5e4!important;border-radius:0!important;padding:24px 0 0!important;box-shadow:none!important}
.covers,.trio{row-gap:clamp(36px,4vw,56px)!important;column-gap:clamp(28px,3.4vw,52px)!important}
.covers .ci svg{width:22px!important;height:22px!important;padding:0!important;background:none!important;margin-bottom:14px!important}
.covers .ci h3,.trio h3{font-size:20px!important;font-weight:650!important;letter-spacing:-.02em!important}

/* the tinted band goes neutral; white cards on grey get the soft corners */
main section[style*="background:#e9f0ef"]{background:#f4f6f6!important}
main section[style*="background:#f4f6f6"] div[style*="background:#ffffff"],main section[style*="background:#e9f0ef"] div[style*="background:#ffffff"],main .vprice>*,main .bprice>*{border-radius:22px}

/* ===== case studies ===== */
.v5-case .v5-hero h1,.v5-case .v5-hero h1.v5-long{font-size:clamp(38px,4.8vw,70px)!important;max-width:18ch}
.v5-case .v5-hero p{font-size:clamp(18px,1.8vw,22px)!important;max-width:58ch!important}
/* the lead photo: full width, soft corners, no wash over it */
.v5-case .v5-proof>.wrap>div[style*="aspect-ratio"]{border:0!important;border-radius:28px!important;max-height:78vh}
.v5-case .v5-proof>.wrap>div[style*="aspect-ratio"]>div[style*="linear-gradient"]{display:none}
/* the facts, on a rule */
.v5-case .metastrip>div{border-top:1px solid #dfe5e4;padding-top:18px}
/* results: a soft panel, no outline */
.v5-case div[style*="linear-gradient(135deg,#ffffff,#ffffff)"]{background:#f4f6f6!important;border:0!important;border-radius:28px}
.v5-case .statrow>div{border-top-width:1px!important;border-top-color:#106a74!important}
/* the ending: one plain deep band, left aligned, no box inside it */
.v5-case .v5-close>.wrap>div{border:0!important;padding:0!important;text-align:left!important;background:transparent!important}
.v5-case .v5-close h2{font-size:clamp(36px,4.6vw,64px)!important;max-width:16ch!important}
.v5-case .v5-close p{margin-left:0!important}
.v5-case .cs-ctas{justify-content:flex-start!important}
.v5-case .cs-ctas a[style*="background:transparent"]{border-color:rgba(255,255,255,.4)!important;border-radius:999px!important}
.v5-case .v5-proof .heroimg{border:0!important;border-radius:28px!important;overflow:hidden}
main :where(.v5-sec:has(>.metastrip)){padding:0!important}
.v5-case .metastrip{padding-top:clamp(32px,4vw,48px)!important;padding-bottom:clamp(8px,2vw,24px)!important}

/* ===== round 3: shared fixes ===== */
/* photos are never washed out with white */
main div[style*="position:absolute;inset:0;background:linear-gradient"][style*="rgba(255,255,255"]:not(:has(*)){display:none!important}
/* a short tail section sits close under the section it belongs to */
main :where(.v5-sec:has(+ .v5-tail)){padding-bottom:clamp(52px,5.4vw,80px)!important}
main :where(.v5-sec.v5-tail){padding-top:0!important;padding-bottom:clamp(88px,10vw,152px)!important}
/* chips: soft pills */
main span[style*="border:1px solid #dfe5e4"][style*="padding:7px 14px"],main span[style*="border:1px solid #dfe5e4"][style*="padding:6px 12px"]{border-radius:999px;border-color:transparent!important;background:#f4f6f6}
/* small fact cards in a row (fmt) become a ruled row */
html body main section .fmt.fmt.fmt>[style]{background:transparent!important;border:0!important;border-top:1px solid #dfe5e4!important;border-radius:0!important;padding:22px 0 0!important}
.fmt{column-gap:clamp(28px,3.4vw,52px)!important}
.fmt>div>div:first-child{font-size:20px!important;font-weight:650!important}
/* video cards: the frame, then the words */
html body main .vgrid .vcard.vcard{border:0!important;background:transparent!important;border-radius:0!important;overflow:visible!important}
.vcard .vthumb{border-radius:20px;overflow:hidden}
.vcard .vmeta{padding:16px 0 0!important;background:transparent!important}
.vcard .vtitle{font-size:19px!important;font-weight:650!important;letter-spacing:-.02em!important}
/* reviews on white: quote first, no box */
main .v5-sec h2+.g3>div:has(>div:first-child:is([style*="★"])),main .g3>div[style*="background:#f4f6f6"]:has(p){border-radius:24px}
/* hero media always fills its frame */
.v5-hero .hero2>div:last-child>img,.v5-hero .hero>div:last-child>img{width:100%;height:100%;object-fit:cover}

/* ===== round 3: case study fixes ===== */
.v5-case .metastrip{padding-bottom:clamp(56px,7vw,96px)!important}
/* icon cards in case studies: the same ruled list as everywhere else */
html body main section .icard.icard.icard{background:transparent!important;border:0!important;border-top:1px solid #dfe5e4!important;border-radius:0!important;padding:22px 0 0!important}
.icard .ico{background:none!important;padding:0!important;width:auto!important;height:auto!important;margin-bottom:12px!important;justify-content:flex-start!important}
.g3c:has(.icard),.g4:has(>.icard){column-gap:clamp(24px,3vw,44px)!important;row-gap:clamp(30px,3.4vw,44px)!important}
/* browser mockups: the screenshot fills the window under its bar */
main div[style*="aspect-ratio:4/3"]>img[style*="object-position:top"]{height:calc(100% - 44px)!important}
/* numbered little cards (booking flow): soft panels */
main .g3[style*="repeat(5,1fr)"]>div{border-radius:18px}
main .g3[style*="repeat(5,1fr)"] span[style*="justify-content:center"]{border-radius:50%}
/* small labels in a box become plain lake text */
main div[style*="display:inline-block"][style*="background:rgba(233,240,239,0.1)"][style*="padding:7px 14px"]{background:none!important;padding:0!important}
/* any closing band with a box inside it: no box, left aligned */
.v5-close>.wrap>div[style*="border:1px solid"]{border:0!important;padding:0!important;text-align:left!important;background:transparent!important}
.v5-close>.wrap>div[style*="border:1px solid"] h2{margin-left:0!important;font-size:clamp(36px,4.6vw,64px)!important;max-width:16ch!important}
.v5-close>.wrap>div[style*="border:1px solid"] p{margin-left:0!important}
.v5-close>.wrap>div[style*="border:1px solid"] div[style*="justify-content:center"]{justify-content:flex-start!important}
.v5-close a[style*="border:1px solid #285f66"]{border-color:rgba(255,255,255,.4)!important;border-radius:999px!important}
/* photo mosaics pack without holes */
.mosaic{grid-auto-flow:dense!important}
.mosaic>div{border-radius:16px;border-color:transparent!important}

/* logo strips: room above, and a full section's breath before what follows */
main :where(.v5-sec.v5-logos){padding-top:clamp(48px,6vw,88px)!important;padding-bottom:clamp(72px,9vw,136px)!important}
main .v5-logos+.v5-sec{padding-top:clamp(24px,3vw,48px)}
/* full-bleed photos behind a band stay square: only cards and photos inside the page get corners */
main section>img[style*="position:absolute"],main section>picture>img[style*="position:absolute"],.v5-close>img{border-radius:0!important}
/* case studies: brand panels and plan cards get the same corners as every other card */
.v5-case .mediaorder,.v5-case .pcard,.v5-case .bw-view{border-radius:20px;overflow:hidden}
.v5-case .oldpages>button{border-radius:14px;overflow:hidden}
/* FAQ: every question sits on a rule */
.v5-faq [data-items]>details{border-top:1px solid #dfe5e4}
.v5-case .cr{border-radius:20px;overflow:hidden}
/* closing bands whose boxed card was opened up: the band itself carries the top space the card used to give */
main .v5-close:has(>.wrap>div[style*="border:1px solid"]){padding-top:clamp(80px,10vw,128px)!important}
/* case studies: more room between the client facts and the story */
.v5-case .v5-proof+.v5-sec>.wrap{padding-bottom:clamp(64px,8.5vw,128px)!important}

/* hero photo: on shorter desktop screens keep it within the window so the headline and buttons sit higher */
@media (min-width:901px){
main .v5-sec.v5-hero{padding-top:clamp(32px,4vw,56px)!important}
.v5-hm{width:100%!important;justify-self:stretch!important;height:min(620px,max(400px,calc(100svh - 200px)))!important;max-height:none!important;aspect-ratio:auto!important;min-height:0!important}
.v5-hm>img,.v5-hm>picture>img{width:100%;height:100%;object-fit:cover}
}

/* phones: service heroes skip the small label above the headline (the breadcrumb already says where you are) */
@media (max-width:900px){.v5-hero:has(a[href="/services"]) .eyebrow{display:none!important}}

/* phones: stat rows stay three across instead of stacking */
@media (max-width:900px){
main section.v5-stats.v5-stats .wrap.wrap[style]{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;padding-top:40px!important;padding-bottom:32px!important}
.v5-stats .wrap>div{padding-top:14px}
.v5-stats .wrap>div>div:first-child{font-size:clamp(24px,7.4vw,34px)!important}
.v5-stats .wrap>div>div:nth-child(2){font-size:12.5px!important;line-height:1.35!important}
}

/* logo strip label: a touch larger so it reads as the caption for the logos */
.v5-logos .wrap>div:first-child{font-size:15px!important;color:#3d4847!important}

/* branding page: a single tidy row of client logos (six on phones) */
section[data-block="branding-and-visual-identity/b13"] [data-logo-wall]>*:nth-child(n+9){display:none!important}
@media (max-width:900px){section[data-block="branding-and-visual-identity/b13"] [data-logo-wall]>*:nth-child(n+7){display:none!important}}

/* one hero spec: same intro text size and the same two equal columns, so pages don't shift as you move between them */
.v5-hero h1~p{font-size:clamp(17px,1.4vw,19px)!important;line-height:1.6!important;max-width:54ch!important}
@media (max-width:900px){main section.v5-hero.v5-hero h1.v5-h1x,main section.v5-hero.v5-hero h1{font-size:38px!important}}
@media (min-width:901px){.v5-hero :has(> .v5-hm){grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:clamp(48px,5.5vw,88px)!important;align-items:center!important}
.v5-hero :has(> .v5-hm)>*{align-self:center!important}
.v5-hero :has(> .v5-hm)>:not(.v5-hm){padding-top:0!important;justify-content:center!important}
.v5-hero:has(a[href="/services"]) .v5-hm{height:min(620px,max(400px,calc(100svh - 260px)))!important}
.v5-hm{margin-top:0!important;margin-bottom:0!important}}
