/* Landing pages (home, services, country and Malaysia pages): shared pieces and the design-system layer.
   Colours, fonts and shapes come from the tokens in main.css (:root); nothing here introduces a new colour.
   country-pages.css (generated from the approved designs) is tokenised the same way. Page-scoped by .cp. */
.cp { padding-top: var(--header-h, 76px); position: relative; z-index: 0; overflow-x: clip; }
.cp *, .cp *::before, .cp *::after { box-sizing: border-box; }
.cp img { max-width: 100%; height: auto; }

/* ---- Design system: type ----------------------------------------------------------------------------------------------------- */
/* Titles follow the original site: Jost, capitals, medium weight, tight tracking. Card and list titles are sentence case. */
.cp :is(h1, h2):not(#_) { font-family: var(--font); font-weight: 500; text-transform: uppercase; letter-spacing: -0.02em; }
.cp :is(h3, dt):not(#_) { font-family: var(--font); font-weight: 500; letter-spacing: -0.005em; }
.cp em { font-style: normal; }

/* ---- Hero: always the dark brand surface (the designs' light heroes are re-coloured here) ---------------------------------------- */
.cp #cp-top { background: var(--deep); color: var(--cream); }
.cp #cp-top :is(h1, h2, strong):not(#_) { color: var(--cream); }
.cp #cp-top :is(p, li, p span):not(#_) { color: var(--cream-soft); }
.cp #cp-top p:first-child:not(#_) { color: var(--lime); border-color: var(--line-strong); }
.cp #cp-top :is(h1, h2) :is(span, em):not(#_) { color: var(--lime); background: none; }
.cp #cp-top p:first-child span:not(#_) { color: var(--lime); }
.cp-my #cp-top p:first-child:not(#_) { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.cp #cp-top a:not(.cp-reel__play):not(#_) { background: transparent; color: var(--cream); border: 1px solid var(--line-strong); }
.cp #cp-top a:not(.cp-reel__play):first-of-type:not(#_) { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.cp #cp-top a:not(.cp-reel__play):hover:not(#_), .cp #cp-top a:not(.cp-reel__play):focus-visible:not(#_) { background: var(--cream); color: var(--deep); border-color: var(--cream); }

/* ---- Showreel facade (loads by itself once in view, see country-pages.js) --------------------------------------------------------- */
.cp-reel { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--forest); border: 1px solid var(--line); }
.cp-reel__play { position: absolute; inset: 0; display: block; color: var(--deep); text-decoration: none; }
.cp-reel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cp-reel__btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: var(--lime); color: var(--deep); display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.cp-reel__play:hover .cp-reel__btn, .cp-reel__play:focus-visible .cp-reel__btn { transform: translate(-50%, -50%) scale(1.06); }
.cp-reel__play:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.cp-reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Client logos: original-colour files on cream tiles ------------------------------------------------------------------------ */
.cp-logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cp-logos li { margin: 0; }
.cp-logo { display: flex; align-items: center; justify-content: center; height: 56px; min-width: 96px; padding: 8px 16px; background: #fff; border: 1px solid var(--line-dark); border-radius: var(--radius); }
.cp-logo img { display: block; height: 100%; max-height: 38px; width: auto; max-width: 150px; object-fit: contain; }
.cp-logo__text { font-family: var(--font); font-weight: 600; font-size: 16px; color: var(--deep); white-space: nowrap; }

.cp-portrait { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius); background: var(--forest); }
.cp-herovideo { display: block; width: 100%; object-fit: cover; background: var(--forest); }
.cp-hm .cp-herovideo { aspect-ratio: 16 / 10; }

.cpu-bar { background: var(--lime); color: var(--deep); text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; padding: 12px 16px; }
.cpu-bar a { color: var(--deep); text-decoration: underline; }

/* ---- Thumbnails -------------------------------------------------------------------------------------------------------------- */
.cp-work__img { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--forest); }
.cp-work__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-svc__img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--forest); }
.cp-svc__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-svc__img--portrait { aspect-ratio: 9 / 12; max-width: 320px; }
.cp-svc__img--blank { background: linear-gradient(180deg, var(--teal) 0%, var(--forest) 55%, var(--deep) 100%); }

/* ---- Reviews, form, notices ---------------------------------------------------------------------------------------------------- */
.cp-rv { margin: 0; background: var(--cream); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cp-rv__stars { margin: 0; color: var(--teal); font-size: 18px; letter-spacing: 0.1em; }
.cp-rv__text { margin: 0; color: var(--deep); font-size: 16px; line-height: 1.6; display: flex; flex-direction: column; gap: 10px; }
.cp-rv__text p { margin: 0; }
.cp-rv__by { margin: 0 !important; font-size: 15px; color: var(--muted-dark); }
.cp-rv__by strong { color: var(--deep); font-size: 17px; font-weight: 600; }
.cp-rv__sum { margin: 0; font-size: 18px; color: var(--muted-dark); }
.cp-rv__all { font-weight: 600; }
.cp-hm form label { color: var(--deep); }
.cp-consent { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: 14px !important; color: var(--muted-dark) !important; }
.cp-consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--teal); }
.cp-consent a { color: var(--teal); text-decoration: underline; }
.cp-notice { margin: 0; padding: 10px 14px; border-radius: var(--radius); font-size: 15px; }
.cp-notice--ok { background: var(--mist); color: var(--deep); }
.cp-notice--err { background: #FBE9E7; color: #8A1C10; } /* functional error colour, as elsewhere in the theme */

/* Reviews carousel: one row of three with previous / next arrows */
.cp-car { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 12px; align-items: center; }
.cp-car__track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; }
.cp-car__track::-webkit-scrollbar { display: none; }
.cp-car__track:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cp-car .cp-rv { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; }
.cp-car__btn { width: 48px; height: 48px; border-radius: var(--radius); border: 1px solid var(--deep); background: transparent; color: var(--deep); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.cp-car__btn--prev svg { transform: rotate(180deg); }
.cp-car__btn:hover:not(:disabled) { background: var(--deep); color: var(--cream); }
.cp-car__btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.cp-car__btn:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 900px) { .cp-car .cp-rv { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 600px) {
	.cp-car { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "track track" "prev next"; row-gap: 14px; }
	.cp-car__track { grid-area: track; }
	.cp-car__btn--prev { grid-area: prev; justify-self: end; }
	.cp-car__btn--next { grid-area: next; justify-self: start; }
	.cp-car .cp-rv { flex-basis: 100%; }
}

/* ---- Home page: the theme's own sections sit between the redesigned blocks ------------------------------------------------------ */
.cp-hm--cont { padding-top: 0; }
.cp-hm .cp-ins { margin-top: 0; }
.cp-hm .ind { margin-top: 8px; }
.cp-hm #clients { background: var(--deep); color: var(--cream); }
.cp-hm #clients :is(h2):not(#_) { color: var(--cream); }
.cp-hm #clients h2 span:not(#_) { color: var(--lime); }
.cp-hm #clients p:not(#_) { color: var(--cream-soft); }
.cp-hm #clients div > p:first-child:not(#_) { color: var(--lime); }
.cp-hm #clients a[href="#contact"]:not(#_) { background: var(--lime); color: var(--deep); border-color: var(--lime); }
.cp-hm #clients a[href="#contact"]:hover:not(#_) { background: var(--cream); color: var(--deep); border-color: var(--cream); }

/* ---- Phones and tablets ---------------------------------------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.cp-reel__btn { width: 64px; height: 64px; }
	.cp-logo { height: 48px; min-width: 84px; padding: 6px 12px; }
	.cp-logo img { max-height: 32px; max-width: 120px; }
	.cp section h1, .cp section h2, .cp section h3 { overflow-wrap: anywhere; }
}
/* Touch targets: stand-alone links and FAQ rows are at least 44px tall. */
@media (max-width: 900px) {
	.cp summary { min-height: 44px; display: flex; align-items: center; box-sizing: border-box; padding-block: 6px; }
	.cp a:not(p a):not(li a):not(.cpu-bar a):not(.cp-work__img):not(.cp-svc__img):not(.cp-reel__play):not(.cp-consent a) { min-height: 44px; box-sizing: border-box; }
	.cp a:not(p a):not(li a):not(.cpu-bar a):not(.cp-consent a):not(:has(*)) { display: inline-flex; align-items: center; }
	.cpu-bar a { display: inline-block; padding-block: 10px; }
	.cp li > a:only-child { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; }
	.cp-us li > a:first-child { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 700px) { .cp ol > li[aria-hidden="true"] { display: none; } } /* decorative arrows between stacked steps */

/* UK: the showreel band continues the dark hero */
.cp-uk #work { background: var(--deep); }
.cp-uk #work p:not(#_) { color: var(--muted); }

/* Insight cards sit on a light band here: muted text must be the dark variant */
.cp-ins { --muted: var(--muted-dark); }

/* Asia: the links of the "ways to work together" cards sit on dark cards (the design left them dark-on-dark) */
.cp-as section[aria-labelledby="engage-h"] a:not(#_) { color: var(--lime); }

/* Services page videos: poster link under a self-starting iframe, then a small link to the project. */
.cp-svc__vid { position: relative; }
.cp-svc__vid .cp-svc__poster { position: absolute; inset: 0; display: block; }
.cp-svc__vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; background: #000; }
.cp-svc__more { margin: 10px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.cp-svc__more a:not(#_) { color: inherit; text-decoration: underline; text-underline-offset: 0.25em; min-height: 0; }

/* AU / HK / SG / MY heroes: the showreel sits full-width in the centre under the headline instead of in a right-hand column. */
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div:not(#_) { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 40px; text-align: center; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div > div:not(#_) { flex: 0 0 auto; width: 100%; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div > div:first-child:not(#_) { max-width: 1040px; align-items: center; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div > div:first-child > :is(p, div, ul):not(#_) { align-self: center; justify-content: center; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div > div:first-child > ul:not(#_) { padding: 0; list-style: none; flex-wrap: wrap; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top > div > #showreel:not(#_) { max-width: 1040px; margin-inline: auto; align-items: center; }
.cp:is(.cp-au, .cp-hk, .cp-sg, .cp-my) #cp-top #showreel .cp-reel:not(#_) { width: 100%; }

/* AI video production showcase (all seven AI pages): the AI videos one under the other, full-width in the centre. */
.cp-aishow { background: var(--deep); color: var(--cream); padding: 80px 24px; }
.cp-aishow__in { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 48px; text-align: center; }
.cp .cp-aishow h2:not(#_) { margin: 0; color: var(--cream); font-size: clamp(1.8rem, 4vw, 3rem); }
.cp-aishow__sub { margin: -28px 0 0; color: var(--cream-soft); font-size: 1.05rem; }
.cp-aishow__item { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cp-aishow .cp-svc__img { border: 1px solid var(--line); }
.cp-aishow figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream-soft); }
.cp-aishow figcaption strong { color: var(--cream); font-weight: 500; margin-right: 0.8em; }
.cp .cp-aishow figcaption a:not(#_) { color: var(--lime); text-decoration: underline; text-underline-offset: 0.25em; min-height: 0; }
@media (max-width: 600px) { .cp-aishow { padding: 56px 16px; } .cp-aishow__in { gap: 36px; } .cp-aishow__sub { margin-top: -20px; } }
