/* GK identity layer (gklawkw.com, 2026-11-23). Everything is scoped to html.gk-id; the switch lives in gk-identity.php.
   Geometry from the logo: G = flat top bar + 3/4 circle (three round corners, one square), crossbar meeting the K stem (the "joint"),
   K arm/leg at ~33deg from upright (the "K-cut": 34 x 52 px). Two line weights only: hairline and 3 px bar. */

html.gk-id{
	--gk-ink:#0F1C2C;--gk-deep:#081828;--gk-slate:#4A5A6E;--gk-steel:#2F6B8A;--gk-sky:#8FB6CF;--gk-mist:#EEF1F5;--gk-line:#D3DAE3;
	--gk-head:"Readex Pro","Tajawal",sans-serif;--gk-ease:cubic-bezier(.2,.7,.1,1);
	--gk-joint:linear-gradient(var(--gk-ink),var(--gk-ink)) 0 50%/30px 3px no-repeat,linear-gradient(var(--gk-ink),var(--gk-ink)) 30px 0/1px 100% no-repeat;
	--gk-joint-rtl:linear-gradient(var(--gk-ink),var(--gk-ink)) 100% 50%/30px 3px no-repeat,linear-gradient(var(--gk-ink),var(--gk-ink)) calc(100% - 30px) 0/1px 100% no-repeat;
}

/* ---------- Type: Readex Pro headings (Arabic + Latin drawn together; the Latin echoes the wordmark), Tajawal body ---------- */
html.gk-id :is(h1,h2,h3,h4,h5,h6,.mo-title-box .title,.elementor-heading-title,.perspective-title,.mo-title-bar h2,.process-box .title,.footer .wg-title,.footer .wp-block-heading){font-family:var(--gk-head) !important;text-transform:none !important}
html.gk-id .mo-title-box .title{font-weight:500 !important;letter-spacing:0 !important}
html.gk-id .elementor-widget-mo-heading-block:not(.gk-on-dark) .mo-title-box .title{color:var(--gk-ink) !important}
html.gk-id[lang^="en"] .mo-title-box .title{letter-spacing:-.012em !important;line-height:1.2 !important}
html.gk-id[lang^="ar"] .mo-title-box .title{line-height:1.42 !important}
html.gk-id .mo-title-box .title-desc{color:var(--gk-slate);max-width:62ch;margin-inline:auto}
html.gk-id .mo-title-box:not(.text-center) .title-desc{margin-inline:0}
html.gk-id .elementor-widget-heading h3.elementor-heading-title{font-weight:500 !important;color:var(--gk-ink)}
html.gk-id .mo-menu-list ul li a{font-family:var(--gk-head) !important;font-weight:400 !important;letter-spacing:0 !important}
html.gk-id .mo-element-mo-button a.button .mo_btn_text{font-family:var(--gk-head) !important;font-weight:500 !important}

/* ---------- The joint (crossbar meeting the K stem) above light section headings ---------- */
html.gk-id .elementor-widget-mo-heading-block:not(.gk-on-dark) .mo-title-box .content-inner::before{content:"";display:block;width:31px;height:14px;margin:0 auto 20px;background:var(--gk-joint)}
html.gk-id[dir="rtl"] .elementor-widget-mo-heading-block:not(.gk-on-dark) .mo-title-box .content-inner::before{background:var(--gk-joint-rtl)}
html.gk-id .elementor-widget-mo-heading-block:not(.gk-on-dark) .mo-title-box:not(.text-center) .content-inner::before{margin-inline:0}
/* the one remaining eyebrow (KDIPA "Official accreditation") reads as information, not decoration */
html.gk-id .mo-title-box .sub-title{margin-bottom:10px !important}
html.gk-id .mo-title-box .sub-title::before,html.gk-id .mo-title-box .sub-title::after{display:none !important}
html.gk-id .mo-title-box .sub-title span{font-family:var(--gk-head) !important;font-size:15px !important;font-weight:500 !important;letter-spacing:0 !important;text-transform:none !important;color:var(--gk-steel) !important;background:none !important;padding:0 !important}

/* ---------- Home hero: K-cut lower corner + the monogram's construction lines, drawn once ---------- */
html.gk-id [data-elementor-type="wp-page"] > .e-parent:first-child:has(.gk-on-dark h1){position:relative;overflow:hidden;clip-path:polygon(0 0,100% 0,100% calc(100% - 78px),calc(100% - 51px) 100%,0 100%)}
html.gk-id[dir="rtl"] [data-elementor-type="wp-page"] > .e-parent:first-child:has(.gk-on-dark h1){clip-path:polygon(0 0,100% 0,100% 100%,51px 100%,0 calc(100% - 78px))}
html.gk-id [data-elementor-type="wp-page"] > .e-parent:first-child:has(.gk-on-dark h1) > .elementor-element{position:relative;z-index:2}
html.gk-id .gk-lines{position:absolute;z-index:1;inset-inline-end:clamp(56px,6vw,110px);bottom:clamp(48px,7vh,80px);width:min(24vw,360px);height:auto;pointer-events:none;overflow:visible}
html.gk-id .gk-lines path{fill:none;stroke:#fff;stroke-width:1.2px;vector-effect:non-scaling-stroke;stroke-linejoin:miter;opacity:.26}
html.gk-id .gk-lines path:first-child{opacity:.34}
html.gk-id.gk-motion .gk-lines path{stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset 2.8s var(--gk-ease);transition-delay:calc(.25s + var(--i) * .22s)}
html.gk-id.gk-motion.gk-drawn .gk-lines path{stroke-dashoffset:0}
html.gk-id .gk-on-dark h1.title{font-weight:500 !important}
html.gk-id .gk-on-dark .mo-title-box .title-desc{color:rgba(255,255,255,.86) !important}
@media (max-width:767px){
	html.gk-id [data-elementor-type="wp-page"] > .e-parent:first-child:has(.gk-on-dark h1){clip-path:polygon(0 0,100% 0,100% calc(100% - 46px),calc(100% - 30px) 100%,0 100%)}
	html.gk-id[dir="rtl"] [data-elementor-type="wp-page"] > .e-parent:first-child:has(.gk-on-dark h1){clip-path:polygon(0 0,100% 0,100% 100%,30px 100%,0 calc(100% - 46px))}
	html.gk-id .gk-lines{width:62vw;inset-inline-end:20px;bottom:64px}
	html.gk-id .gk-lines path{opacity:.16}
}

/* ---------- Inner title bar: same lines, static, plus the K-cut ---------- */
html.gk-id .mo-title-bar-wrap{position:relative;overflow:hidden;clip-path:polygon(0 0,100% 0,100% calc(100% - 52px),calc(100% - 34px) 100%,0 100%)}
html.gk-id[dir="rtl"] .mo-title-bar-wrap{clip-path:polygon(0 0,100% 0,100% 100%,34px 100%,0 calc(100% - 52px))}
html.gk-id .mo-title-bar-wrap::after{content:"";position:absolute;z-index:1;inset-inline-end:-2vw;bottom:-18%;width:min(44vw,560px);aspect-ratio:467/249;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 467 249' fill='none' stroke='white' stroke-width='1.1' stroke-linejoin='miter'%3E%3Cpath d='M229.5 .38L117 .38C51.75 .38 .38 53.62 .38 120C.38 189 51.75 243 117.75 243C162 243 193.5 219.75 236.25 182.25C270.75 152.25 292.5 138.75 321.75 138.75C351 138.75 371.25 150 383.25 171.75L420 238.88L462.38 238.88L420.75 162C410.25 143.25 401.25 132 385.88 120C401.25 108 409.5 95.25 420.75 75.75L462.38 .38L420 .38L383.25 68.25C372.75 89.25 354 100.5 324 100.5L295.88 100.5L295.88 .38L258.38 .38L258.38 100.88L122.25 100.88L122.25 138.75L229.5 138.75L193.5 168.75C164.25 192.75 141.75 205.5 117.75 205.5C72 205.5 37.88 168 37.88 120C37.88 75 72 38.25 117.75 38.25L229.5 38.25Z'/%3E%3C/svg%3E") no-repeat center/contain;opacity:.16;pointer-events:none}
html.gk-id .mo-title-bar h2{font-weight:500 !important}

/* ---------- One title per page: where the first heading repeats the title bar (Practice areas, Team, KDIPA; AR 43/45/47, EN 55/57/59),
   the title bar keeps the visible title and the H1 stays for screen readers and search engines only. About/Contact differ, so they keep both. ---------- */
html.gk-id body:is(.page-id-43,.page-id-45,.page-id-47,.page-id-55,.page-id-57,.page-id-59) [data-elementor-type="wp-page"] > .e-parent:first-child .elementor-widget-mo-heading-block:has(h1.title) h1.title{position:absolute !important;width:1px !important;height:1px !important;margin:-1px !important;padding:0 !important;overflow:hidden !important;clip-path:inset(50%) !important;white-space:nowrap !important;border:0 !important}
html.gk-id body:is(.page-id-43,.page-id-45,.page-id-57,.page-id-55) [data-elementor-type="wp-page"] > .e-parent:first-child .elementor-widget-mo-heading-block:has(h1.title) .content-inner::before{display:none}

/* ---------- Home credentials: the joint as the item marker (a set, not a sequence: no numbers) ---------- */
html.gk-id .e-grid > .e-con.e-child:has(> .elementor-widget-heading h3):has(> .elementor-widget-text-editor):not(:has(.elementor-widget-image)):not(:has(> .e-con)) > .elementor-widget-heading::before{content:"";display:block;width:31px;height:12px;margin-bottom:16px;background:var(--gk-joint)}
html.gk-id[dir="rtl"] .e-grid > .e-con.e-child:has(> .elementor-widget-heading h3):has(> .elementor-widget-text-editor):not(:has(.elementor-widget-image)):not(:has(> .e-con)) > .elementor-widget-heading::before{background:var(--gk-joint-rtl)}

/* ---------- Home practice cards (Saga image box style 4): K-cut corner, ink fade, crossbar on hover ---------- */
html.gk-id .image-box-style4{position:relative;border-radius:0 !important;clip-path:polygon(0 0,calc(100% - 34px) 0,100% 52px,100% 100%,0 100%)}
html.gk-id[dir="rtl"] .image-box-style4{clip-path:polygon(34px 0,100% 0,100% 100%,0 100%,0 52px)}
html.gk-id .image-box-style4 .perspective_overlay{background:linear-gradient(180deg,rgba(15,28,44,0) 30%,rgba(15,28,44,.9) 100%) !important;opacity:1 !important}
html.gk-id .image-box-style4 .perspective-title{font-weight:500 !important;line-height:1.4 !important}
html.gk-id .image-box-style4::after{content:"";position:absolute;z-index:3;inset-inline:0;bottom:0;height:3px;background:var(--gk-sky);transform:scaleX(0);transform-origin:left center;transition:transform .45s var(--gk-ease)}
html.gk-id[dir="rtl"] .image-box-style4::after{transform-origin:right center}
html.gk-id .image-box-style4:hover::after,html.gk-id .image-box-style4:focus-within::after{transform:scaleX(1)}

/* ---------- Practice pages: photo cards (image + title + text) ---------- */
html.gk-id .e-grid > .e-con.e-child:has(> .elementor-widget-image):has(> .elementor-widget-heading) .elementor-widget-image img{border-radius:0 !important}
html.gk-id .e-grid > .e-con.e-child:has(> .elementor-widget-image):has(> .elementor-widget-heading) > .elementor-widget-heading::before{content:"";display:block;height:3px;width:30px;margin:0 0 14px;background:var(--gk-ink);transition:width .45s var(--gk-ease)}
html.gk-id .e-grid > .e-con.e-child:has(> .elementor-widget-image):has(> .elementor-widget-heading):hover > .elementor-widget-heading::before{width:100%}

/* ---------- Editorial photo (About): the G silhouette - three round corners, the square one where the G's top bar is ---------- */
html.gk-id .gk-photo img{border-radius:clamp(56px,8vw,128px) 0 clamp(56px,8vw,128px) clamp(56px,8vw,128px) !important}
html.gk-id.gk-motion .gk-photo img{clip-path:inset(0 0 100% 100%);transition:clip-path 1.1s var(--gk-ease)}
html.gk-id.gk-motion .gk-photo img.gk-in{clip-path:inset(0 0 0 0)}

/* ---------- Team: initial tiles take the same G silhouette (photo and tiles read as one system) ---------- */
/* a tile = a container whose ONLY child is a heading widget rendered as <span> (the initial) */
html.gk-id .e-con.e-child:has(> .elementor-widget-heading:only-child > span.elementor-heading-title){border-radius:999px 0 999px 999px !important;background-color:var(--gk-ink) !important;overflow:hidden}
html.gk-id .e-con.e-child:has(> .elementor-widget-heading:only-child > span.elementor-heading-title) span.elementor-heading-title{font-family:var(--gk-head) !important;font-weight:400 !important}

/* ---------- KDIPA: institutional panel - ink stem on the start side, hairlines, no double frame ---------- */
html.gk-id .e-con:has(> .elementor-widget-icon-list){border:1px solid var(--gk-line) !important;border-inline-start:4px solid var(--gk-ink) !important;outline:0 !important;box-shadow:none !important;border-radius:0 !important;background-color:#fff}
html.gk-id .e-con:has(> .elementor-widget-icon-list) .elementor-icon-list-icon svg{fill:var(--gk-steel) !important}
html.gk-id .elementor-widget-icon-list .elementor-icon-list-item:not(:last-child){border-color:var(--gk-line) !important}

/* KDIPA steps (a real sequence, so the numbers stay): square markers, as the monogram has no soft corners */
html.gk-id .process-box .number-step{border-radius:0 !important;background-color:var(--gk-ink) !important;font-family:var(--gk-head) !important;font-weight:500}
html.gk-id .process-box .number-step::before,html.gk-id .process-box .number-step::after{border-radius:0 !important}

/* ---------- Buttons: square (the logo has no soft corners); a sky bar slides in from the start edge on hover/focus ---------- */
html.gk-id .mo-element-mo-button a.button{border-radius:0 !important;box-shadow:none !important;background-image:linear-gradient(var(--gk-sky),var(--gk-sky)) !important;background-repeat:no-repeat !important;background-size:0 3px !important;background-position:left bottom !important;transition:background-color .25s ease,background-size .45s var(--gk-ease),color .25s ease !important}
html.gk-id[dir="rtl"] .mo-element-mo-button a.button{background-position:right bottom !important}
html.gk-id .mo-element-mo-button a.button:hover,html.gk-id .mo-element-mo-button a.button:focus-visible{background-size:100% 3px !important;box-shadow:none !important}
html.gk-id .gk-btn-ghost a.button{box-shadow:inset 0 0 0 1px rgba(255,255,255,.7) !important}
html.gk-id .gk-btn-ghost a.button:hover,html.gk-id .gk-btn-ghost a.button:focus-visible{box-shadow:inset 0 0 0 1px #fff !important}

/* ---------- Header: active page marked with the joint, in the link's own colour ---------- */
html.gk-id .mo-menu-list ul li.current-menu-item > a,html.gk-id .mo-menu-list ul li.current_page_item > a{box-shadow:none !important;background:linear-gradient(currentColor,currentColor) 0 calc(100% - 1px)/22px 2px no-repeat,linear-gradient(currentColor,currentColor) 22px calc(100% - 1px)/1px 9px no-repeat !important}
html.gk-id[dir="rtl"] .mo-menu-list ul li.current-menu-item > a,html.gk-id[dir="rtl"] .mo-menu-list ul li.current_page_item > a{background:linear-gradient(currentColor,currentColor) 100% calc(100% - 1px)/22px 2px no-repeat,linear-gradient(currentColor,currentColor) calc(100% - 22px) calc(100% - 1px)/1px 9px no-repeat !important}
html.gk-id .mo-menu-list ul li.lang-item a{border-radius:0 !important}

/* ---------- Footer: the joint before each column heading ---------- */
html.gk-id .footer :is(.wg-title,.footer-widget-3 .wp-block-heading)::before{content:"";display:block;width:31px;height:10px;margin-bottom:14px;background:linear-gradient(var(--gk-sky),var(--gk-sky)) 0 50%/30px 2px no-repeat,linear-gradient(var(--gk-sky),var(--gk-sky)) 30px 0/1px 100% no-repeat}
html.gk-id[dir="rtl"] .footer :is(.wg-title,.footer-widget-3 .wp-block-heading)::before{background:linear-gradient(var(--gk-sky),var(--gk-sky)) 100% 50%/30px 2px no-repeat,linear-gradient(var(--gk-sky),var(--gk-sky)) calc(100% - 30px) 0/1px 100% no-repeat}

/* ---------- Focus: visible everywhere, lighter on dark ---------- */
html.gk-id :is(a,button,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--gk-steel) !important;outline-offset:3px}
html.gk-id :is(.footer,.mo-header-v5:not(.mo-header-stick),.gk-on-dark,[data-elementor-type="wp-page"] > .e-parent:first-child) :is(a,button):focus-visible{outline-color:var(--gk-sky) !important}

@media (prefers-reduced-motion:reduce){
	html.gk-id .image-box-style4::after,html.gk-id .mo-element-mo-button a.button,html.gk-id .gk-photo img,html.gk-id .e-grid .elementor-widget-heading::before{transition:none !important}
}
