/* SWANA button system, 25 Nov 2026. Source: the IoT Squared case study (websites/ksa/case-study/iot-squared).
   One file for every SWANA page. Linked last in <head>, so it wins over each page's own button rules.
   Four colors, mixed and matched (rules of 25 Nov): ORIGIN Purple, White with a black ring, ORIGIN Mint, ORIGIN Blue.
   Hover: Purple to Mint, White to Blue, Mint to Blue, Blue to White. On a white ground the white button is never used.
   Contact CTAs are Mint at rest.
   Shape: pill, 48px, 0 24px, 12.5px caps .1em, weight 500, 1.5px border, lift 2px, ease .22,.8,.2,1.
   Arabic keeps its own type: no caps, letter spacing 0. */

html:root{ --sb-purple:#5C11D1; --sb-mint:#0BFFB9; --sb-blue:#2049F2; --sb-cyan:#33D9FF; --sb-ease:cubic-bezier(.22,.8,.2,1); }

/* ===== 1. Landing pages: .o-btn ===== */
html:root body .o-btn{
  min-height:48px; padding:0 24px; gap:10px; border-radius:999px; border:1.5px solid transparent;
  font-size:12.5px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; line-height:1;
  transition:transform .3s var(--sb-ease), background-color .3s, color .3s, border-color .3s;
}
html:root body .o-btn:lang(ar){ letter-spacing:0; text-transform:none; font-size:14px; font-weight:700; }
html:root body .o-btn.o-btn--sm{ min-height:42px; padding:0 20px; }
html:root body .o-btn:hover{ transform:translateY(-2px); }
html:root body .o-btn:active{ transform:translateY(0); }
html:root body .o-btn svg, html:root body .o-btn .o-icon{ flex:none; }

/* Purple at rest (primary and every secondary on a light ground, because the white button is never used on white); hover and focus Mint */
html:root body .o-btn:is(.o-btn--primary,.o-btn--secondary){ background:var(--sb-purple); border-color:var(--sb-purple); color:#fff; }
html:root body .o-btn:is(.o-btn--primary,.o-btn--secondary):is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }

/* White with a black ring on every dark ground (secondary buttons); hover and focus Blue with white text */
html:root body :is(.p-sec--night,.p-form,.p-hc__box,.p-aio.is-blue,.p-sheet,.p-cs__hero,.p-cs__cta,.p-hero--flow,.p-hero2,.p-tier--sell,.p-foot,.p-eman) .o-btn.o-btn--secondary{ background:#fff; border-color:#000; color:#000; }
html:root body :is(.p-sec--night,.p-form,.p-hc__box,.p-aio.is-blue,.p-sheet,.p-cs__hero,.p-cs__cta,.p-hero--flow,.p-hero2,.p-tier--sell,.p-foot,.p-eman) .o-btn.o-btn--secondary:is(:hover,:focus-visible){ background:var(--sb-blue); border-color:var(--sb-blue); color:#fff; }

/* the data-hire button follows the role it is given above */
html:root body .o-btn[data-hire]:is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }

/* ===== focus ring, every page: 3px cyan, offset 3px ===== */
html:root body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{ outline:3px solid var(--sb-cyan); outline-offset:3px; }

/* ===== controls: shapes kept; Mint hover on the icon-style controls ===== */
html:root body :is(.p-back,.p-snd,.p-cs__x,.p-hc__x,.p-sheet__x):is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }
html:root body .p-lubtn:is(:hover,:focus-visible){ background:var(--sb-mint); color:#000; }
html:root body .p-lubtn:is(:hover,:focus-visible) i::before, html:root body .p-lubtn:is(:hover,:focus-visible) i::after{ background:#000; }

@media (prefers-reduced-motion:reduce){ html:root body .o-btn{ transition:none; } html:root body .o-btn:hover{ transform:none; } }

/* ===== 2. Warranty pages and privacy policy: the plain .btn (no modifier). Purple, Mint hover and focus ===== */
html:root body .btn:not([class*="btn--"]){
  display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 24px;
  border-radius:999px; border:1.5px solid var(--sb-purple); background:var(--sb-purple); color:#fff;
  font-size:12.5px; font-weight:500; letter-spacing:.1em; text-transform:uppercase; line-height:1; white-space:normal; text-align:center;
  filter:none; transition:transform .3s var(--sb-ease), background-color .3s, color .3s, border-color .3s;
}
html:root body .btn:not([class*="btn--"]):hover{ transform:translateY(-2px); filter:none; }
html:root body .btn:not([class*="btn--"]):is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }
html:root body .btn:not([class*="btn--"]):lang(ar){ letter-spacing:0; text-transform:none; font-size:14px; font-weight:700; }

/* ===== 3. Cookie banner (#origin-consent, injected by shared/origin-tracking.js) =====
   Accept all and Decline keep equal weight (both Purple, the banner is a white card), Mint on hover and focus. */
html:root body #origin-consent .oc-btn{ border-width:1.5px; border-color:var(--sb-purple); background:var(--sb-purple); color:#fff; transition:transform .3s var(--sb-ease), background-color .3s, color .3s, border-color .3s; }
html:root body #origin-consent .oc-btn:is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; transform:translateY(-2px); }
html:root body #origin-consent .oc-sw{ border-width:1.5px; }
html:root body #origin-consent .oc-sw:is(:hover,:focus-visible){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }

/* ===== Design-call slots. Each lives between its own markers so one commit can be reverted alone. ===== */

/* [contact begins] */
/* ===== Contact CTAs (rule 5): every button that opens the form, the calculator or the package offer, plus the form's own Start and Send, and the
   Write to info@ button on warranty and privacy. Mint at rest with black text, hover and focus Blue with white text. Revert this block to
   put those buttons back on the Purple role. ===== */
html:root body .o-btn:not(#c):is([data-go="form"],[data-go="offer"],[data-go="calc"]:not(.p-hc__box *),#tf-start,#tf-ok,.p-form__acts .o-btn--primary){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }
html:root body .o-btn:not(#c):is([data-go="form"],[data-go="offer"],[data-go="calc"]:not(.p-hc__box *),#tf-start,#tf-ok,.p-form__acts .o-btn--primary):is(:hover,:focus-visible){ background:var(--sb-blue); border-color:var(--sb-blue); color:#fff; }
html:root body .btn:not([class*="btn--"])[href^="mailto:"]:not(#c){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }
html:root body .btn:not([class*="btn--"])[href^="mailto:"]:not(#c):is(:hover,:focus-visible){ background:var(--sb-blue); border-color:var(--sb-blue); color:#fff; }
/* [contact ends] */

/* [blue band begins] */
/* ===== Blue band (.p-aio.is-blue, #2049F2): a Blue hover would vanish on the Blue ground. Mint contact CTA hovers White with a black ring;
   the white secondary hovers Purple. Awaiting Marwan's answer; revert this block to get plain Blue back. ===== */
html:root body .p-aio.is-blue .o-btn:not(#c):is([data-go="form"],[data-go="offer"],[data-go="calc"]:not(.p-hc__box *),#tf-start,#tf-ok,.p-form__acts .o-btn--primary):is(:hover,:focus-visible){ background:#fff; border-color:#000; color:#000; }
html:root body .p-aio.is-blue .o-btn.o-btn--secondary:not(#c):not(:is([data-go="form"],[data-go="offer"],[data-go="calc"]:not(.p-hc__box *),#tf-start,#tf-ok,.p-form__acts .o-btn--primary)):is(:hover,:focus-visible){ background:var(--sb-purple); border-color:var(--sb-purple); color:#fff; }
/* [blue band ends] */

/* [light border begins] */
/* ===== Light grounds: the Mint hover is 1.31:1 against white, so its edge nearly vanishes. The Purple to Mint hover and focus gets a 1.5px black
   border on a light ground (16:1 edge). Dark grounds and the Blue hover are untouched. Awaiting Marwan's answer; revert this block to remove. ===== */
html:root body #app .o-btn:is(.o-btn--primary,.o-btn--secondary):not(:is([data-go="form"],[data-go="offer"],[data-go="calc"]:not(.p-hc__box *),#tf-start,#tf-ok,.p-form__acts .o-btn--primary)):is(:hover,:focus-visible):not(:is(.p-sec--night,.p-form,.p-hc__box,.p-aio.is-blue,.p-sheet,.p-cs__hero,.p-cs__cta,.p-hero--flow,.p-hero2,.p-tier--sell,.p-foot,.p-eman) *){ border-color:#000; }
html:root[data-theme="light"] body .btn:not([class*="btn--"]):not([href^="mailto:"]):is(:hover,:focus-visible){ border-color:#000; }
@media (prefers-color-scheme:light){ html:root:not([data-theme]) body .btn:not([class*="btn--"]):not([href^="mailto:"]):is(:hover,:focus-visible){ border-color:#000; } }
html:root body #origin-consent :is(.oc-btn,.oc-sw):is(:hover,:focus-visible){ border-color:#000; }
/* [light border ends] */

/* [client pages begins] */
/* ===== Client pages (the 16 case studies). Rule 4: at rest a button keeps the client's own identity color (the page's own tints, set in each
   page, unchanged); on hover it uses ORIGIN colors (Mint). Rule 5 wins for contact: every button that leads to the form or to email is Mint
   at rest with a Blue hover, so the client color shows on the other buttons (visit the site, next case, outlines). ===== */
html:root body .btn:not(#c):is([href*="#form"],[href^="mailto:"],[href^="tel:"],[href*="wa.me"]){ background:var(--sb-mint); border-color:var(--sb-mint); color:#000; }
html:root body .btn:not(#c):is([href*="#form"],[href^="mailto:"],[href^="tel:"],[href*="wa.me"]):is(:hover,:focus-visible){ background:var(--sb-blue); border-color:var(--sb-blue); color:#fff; }
/* [client pages ends] */

/* [flag 4 begins] */
/* ===== FLAG 4: focus ring by ground. Cyan #33D9FF is 12:1 on black and night but 1.68:1 on white. Dark grounds keep the 3px cyan ring;
   light grounds get a 3px black ring (same width, same offset). !important so the pages' older one-off rings (2px purple, 2px white) lose.
   Revert this block to go back to cyan everywhere. ===== */
html:root body :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline:3px solid var(--sb-cyan) !important; outline-offset:3px !important; }
html:root body #app :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible:not(:is(.p-sec--night,.p-form,.p-hc__box,.p-aio.is-blue,.p-sheet,.p-cs__hero,.p-cs__cta,.p-hero--flow,.p-hero2,.p-tier--sell,.p-foot,.p-eman) *){ outline-color:#000 !important; }
html:root body :is([data-th="light"],.fl:not(.on-light),.dw-go) :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline-color:#000 !important; }
html:root body #origin-consent :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline-color:#000 !important; }
html:root[data-theme="light"]:has(a.btn:not([class*="btn--"])) body :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline-color:#000 !important; }
@media (prefers-color-scheme:light){ html:root:not([data-theme]):has(a.btn:not([class*="btn--"])) body :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline-color:#000 !important; } }
/* dark cards and panels (.pk--mine, .el-ask, .qe-cta, .df-go) sit inside light sections on the case studies: they keep the cyan ring */
html:root body :is(.pk.pk--mine,.el-ask,.qe-cta,.df-go) :is(a,button,input,select,textarea,summary,[tabindex],[role="button"]):focus-visible{ outline-color:var(--sb-cyan) !important; }
/* [flag 4 ends] */


