:root {
  --kal-green: #71a241;
  --kal-green-deep: #557d30;
  --kal-silver: #92959a;
  --kal-white: #ffffff;
  --kal-charcoal: #171a1d;
  --kal-muted: #656a70;
  --kal-border: rgba(146, 149, 154, 0.26);
  --kal-shadow: 0 34px 80px rgba(36, 42, 31, 0.13), 0 8px 24px rgba(23, 26, 29, 0.07);
  --soft-background: #f5f6f3;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--kal-charcoal);
  background: var(--soft-background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; height: 100%; background: var(--soft-background); }
body { min-width: 320px; height: 100%; margin: 0; overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
.is-arabic { font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; inset-block-start: 10px; inset-inline-start: 10px; z-index: 100; padding: 10px 14px; color: white; background: var(--kal-charcoal); border-radius: 10px; transform: translateY(-150%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }

.site-shell { position: relative; isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; height: 100svh; padding: max(12px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) max(12px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% 42%, rgba(113,162,65,.14), transparent 32%), radial-gradient(circle at 8% 4%, rgba(255,255,255,.95), transparent 25%), linear-gradient(135deg, #fafbf9, #f0f2ef 58%, #f8f9f7); overflow: hidden; }
.site-shell::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .3; background-image: linear-gradient(rgba(146,149,154,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(146,149,154,.1) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 72%); }
.site-shell::after { content: ""; position: absolute; z-index: -1; width: min(72vw, 880px); aspect-ratio: 1; inset-inline-start: 50%; inset-block-start: 42%; border: 1px solid rgba(146,149,154,.16); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 90px rgba(255,255,255,.12), 0 0 0 180px rgba(146,149,154,.025); }
[dir="rtl"] .site-shell::after { transform: translate(50%, -50%); }
.architecture { position: absolute; inset-block-start: -9%; inset-inline-end: -2%; z-index: -1; display: flex; gap: clamp(15px, 2vw, 30px); width: min(48vw, 650px); height: 52%; opacity: .38; transform: skewX(-20deg); pointer-events: none; }
.architecture span { flex: 1; background: linear-gradient(90deg, transparent, rgba(146,149,154,.19), rgba(255,255,255,.65), rgba(146,149,154,.08)); border-inline: 1px solid rgba(146,149,154,.15); box-shadow: 12px 18px 25px rgba(40,45,38,.035); }
.site-header { display: none; }
.language-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; margin-block-end: clamp(12px, 1.8vh, 18px); border: 1px solid var(--kal-border); border-radius: 999px; background: rgba(255,255,255,.75); box-shadow: 0 6px 18px rgba(30,35,29,.05); backdrop-filter: blur(14px); }
.language-switch button { min-width: 68px; min-height: 32px; padding: 5px 14px; border: 0; border-radius: 999px; color: var(--kal-muted); background: transparent; font-size: .78rem; font-weight: 500; cursor: pointer; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.language-switch button[aria-pressed="true"], .language-switch button.is-active { color: var(--kal-charcoal); background: white; box-shadow: 0 3px 10px rgba(23,26,29,.09); font-weight: 600; }
.language-switch button:focus-visible, .card-face a:focus-visible, .card-face button:focus-visible { outline: 3px solid rgba(113,162,65,.38); outline-offset: 3px; }

.main-content { align-self: center; display: flex; flex-direction: column; align-items: center; width: 100%; padding-block: clamp(10px, 2vh, 20px); opacity: 1; transition: opacity .16s ease; }
.main-content.is-translating { opacity: .72; }
.branch-switcher { display: inline-flex; align-items: center; gap: 6px; padding: 5px; margin-block-end: clamp(10px, 2vh, 18px); border: 1px solid var(--kal-border); border-radius: 999px; background: rgba(255,255,255,.75); box-shadow: 0 10px 30px rgba(30,35,29,.06); backdrop-filter: blur(14px); }
.branch-switcher button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 999px; color: var(--kal-muted); background: transparent; font-size: .8rem; font-weight: 500; cursor: pointer; transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease; }
.branch-switcher button.is-active { color: var(--kal-charcoal); background: white; box-shadow: 0 4px 14px rgba(23,26,29,.1); font-weight: 600; }
.branch-switcher button:hover:not(.is-active) { color: var(--kal-charcoal); background: rgba(146,149,154,.1); }
.flag-icon { font-size: .95rem; line-height: 1; }
.supporting-copy { margin: 0 0 13px; color: #696e72; font-size: .78rem; letter-spacing: .02em; text-align: center; }
.card-perspective { width: min(100%, 480px); perspective: 1800px; cursor: pointer; border-radius: clamp(26px, 7vw, 34px); }
.card-perspective:focus-visible { outline: 3px solid rgba(113,162,65,.38); outline-offset: 5px; }
.card-perspective a, .card-perspective button { cursor: pointer; }
.tilt-shell { --tilt-x: 0deg; --tilt-y: 0deg; --pointer-x: 20%; --pointer-y: 0%; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; transition: transform .35s ease-out; }
.business-card { display: grid; width: 100%; transform-style: preserve-3d; transition: transform .74s cubic-bezier(.2,.72,.22,1), opacity .16s ease; }
.business-card.is-switching { opacity: 0; }
.business-card.is-flipped { transform: rotateY(180deg); }
.card-face { grid-area: 1 / 1; position: relative; min-width: 0; border: 1px solid var(--kal-border); border-radius: clamp(26px, 7vw, 34px); background: linear-gradient(145deg, rgba(255,255,255,.99), rgba(248,249,247,.96)); box-shadow: var(--kal-shadow), inset 0 1px 0 white, inset 0 0 0 1px rgba(255,255,255,.7); backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; overflow: hidden; }
.card-front { transform: rotateY(0deg) translateZ(1px); z-index: 2; }
.card-back { transform: rotateY(180deg) translateZ(1px); z-index: 1; }
.business-card:not(.is-flipped) .card-front { pointer-events: auto; }
.business-card:not(.is-flipped) .card-back { pointer-events: none; }
.business-card.is-flipped .card-front { pointer-events: none; }
.business-card.is-flipped .card-back { pointer-events: auto; }
.card-face::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: linear-gradient(to bottom, transparent 8%, var(--kal-green) 32%, #9bb977 68%, transparent 92%); opacity: .75; border-start-start-radius: inherit; border-end-start-radius: inherit; }
.face-content { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; height: 100%; box-sizing: border-box; padding: clamp(20px, 5vw, 28px); }
.card-header { display: flex; align-items: center; justify-content: center; padding-block-end: 2px; }
.logo-frame { display: flex; align-items: center; justify-content: center; width: auto; max-width: 160px; height: auto; }
.logo-frame img { display: block; width: 100%; max-width: 145px; height: auto; max-height: 85px; object-fit: contain; }
.logo-frame-large { max-width: 270px; margin-block: 6px 12px; }
.logo-frame-large img { max-width: 250px; max-height: 140px; }
.title-block { text-align: center; padding-block: 2px 4px; }
.brand-kicker { margin: 0 0 5px !important; color: var(--kal-green) !important; font: 500 .63rem/1 Orbitron, sans-serif !important; letter-spacing: .15em; text-align: center; }
.brand-kicker span { color: var(--kal-silver); }
.title-block h2 { margin: 0; font: 500 clamp(1.26rem, 5vw, 1.58rem)/1.25 Orbitron, sans-serif; letter-spacing: -.02em; text-align: center; }
.is-arabic .title-block h2 { font: 600 clamp(1.38rem, 5vw, 1.72rem)/1.35 "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; text-align: center; }
.title-block > p:last-child { margin: 5px 0 0; color: var(--kal-muted); font-size: .82rem; line-height: 1.55; text-align: center; }
.primary-actions { display: grid; grid-template-columns: 1.08fr .92fr; gap: 9px; }
.primary-actions-4 { grid-template-columns: 1fr 1fr; }
.primary-actions-4 .action { min-height: 52px; padding: 8px 10px; }
.action { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 58px; padding: 10px 12px; border-radius: 16px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.action:hover { transform: translateY(-2px); }
.action-primary { color: white; background: linear-gradient(145deg, #78aa47, #628f37); box-shadow: 0 10px 20px rgba(83,125,46,.2); }
.action-secondary { border: 1px solid rgba(113,162,65,.25); color: var(--kal-charcoal); background: rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(30,35,29,.03); }
.action-secondary:hover { background: white; border-color: rgba(113,162,65,.45); box-shadow: 0 8px 18px rgba(83,125,46,.1); }
.action .icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; transition: background .2s ease, transform .2s ease; }
.action-primary .icon { background: rgba(255,255,255,.22); color: white; }
.action-secondary .icon { background: rgba(113,162,65,.12); color: var(--kal-green); }
.action:hover .icon { transform: scale(1.06); }
.action span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.action strong { overflow: hidden; font-size: .72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.action small { opacity: .82; font-size: .59rem; white-space: nowrap; }
.contact-list { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; padding-block: 3px; }
.link-row { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 49px; height: 49px; border: 1px solid rgba(113,162,65,.25); border-radius: 15px; color: var(--kal-green-deep); background: linear-gradient(145deg, rgba(242,247,238,.85), rgba(235,242,230,.7)); box-shadow: 0 4px 12px rgba(23,26,29,.035); transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease; }
.link-row:hover { color: white; border-color: var(--kal-green); background: var(--kal-green); box-shadow: 0 9px 18px rgba(83,125,46,.2); transform: translateY(-3px); }
.link-row .icon { font-size: 1.08rem; line-height: 1; }
.link-row::after { content: attr(data-tooltip); position: absolute; inset-block-end: calc(100% + 8px); inset-inline-start: 50%; z-index: 10; width: max-content; max-width: 180px; padding: 6px 9px; border-radius: 8px; color: white; background: rgba(23,26,29,.94); font-size: .62rem; line-height: 1.2; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .18s ease, transform .18s ease; }
[dir="rtl"] .link-row::after { transform: translate(50%, 4px); }
.link-row:hover::after, .link-row:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
[dir="rtl"] .link-row:hover::after, [dir="rtl"] .link-row:focus-visible::after { transform: translate(50%, 0); }
.utility-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; padding-block-start: 4px; }
.utility-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid rgba(146,149,154,.2); border-radius: 14px; color: var(--kal-charcoal); background: rgba(255,255,255,.8); box-shadow: 0 4px 12px rgba(23,26,29,.03); cursor: pointer; transition: background .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease; }
.utility-actions button:hover { color: var(--kal-charcoal); border-color: rgba(113,162,65,.35); background: white; box-shadow: 0 6px 16px rgba(83,125,46,.12); transform: translateY(-1.5px); }
.utility-actions .icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: .88rem; color: var(--kal-green); transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.utility-actions button:hover .icon { transform: rotate(180deg); }
.utility-actions span { font-size: .74rem; font-weight: 500; }
.site-footer { display: flex; align-items: center; justify-content: center; text-align: center; gap: 16px; max-width: 1120px; width: 100%; margin-inline: auto; color: #7c8084; font-size: .63rem; }
.site-footer p { margin: 0; text-align: center; }
.site-footer span { font-family: Orbitron, sans-serif; font-size: .52rem; letter-spacing: .06em; }
.is-arabic .site-footer span { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: .65rem; letter-spacing: 0; }
.toast { position: fixed; inset-inline-start: 50%; inset-block-end: max(24px, env(safe-area-inset-bottom)); z-index: 100; padding: 11px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: white; background: rgba(23,26,29,.92); box-shadow: 0 10px 30px rgba(23,26,29,.2); font-size: .78rem; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s ease, transform .25s ease; }
[dir="rtl"] .toast { transform: translate(50%, 12px); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
[dir="rtl"] .toast.is-visible { transform: translate(50%, 0); }
.fallback-content > img { width: 100px; height: 100px; object-fit: contain; }
.fallback-links { display: grid; gap: 8px; }
.fallback-links a { min-height: 48px; padding: 12px; border: 1px solid var(--kal-border); border-radius: 12px; }

@keyframes sheen { from { inset-inline-start: -65%; } to { inset-inline-start: 135%; } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stagger-item { animation: enter .52s both; animation-delay: calc(var(--stagger) * 35ms + 80ms); }

@media (max-width: 390px) {
  .site-shell { padding-inline: 14px; }
  .face-content { gap: 11px; padding: 18px 16px; }
  .logo-frame { width: 62px; height: 48px; }
  .logo-frame img { width: 66px; height: 66px; }
  .primary-actions { gap: 7px; }
  .action { gap: 7px; padding-inline: 9px; }
  .action .icon { width: 18px; height: 18px; }
  .action strong { font-size: .65rem; }
  .action small { font-size: .52rem; }
  .contact-list { gap: 7px; }
  .link-row { width: 45px; height: 45px; }
}

@media (max-width: 350px) {
  .language-switch button { min-width: 72px; padding-inline: 11px; }
  .face-content { padding-inline: 14px; }
  .action small { display: none; }
  .contact-list { gap: 6px; }
  .link-row { width: 42px; height: 42px; }
  .site-footer { flex-direction: column; gap: 4px; }
}

@media (min-width: 768px) {
  .main-content { padding-block: clamp(10px, 2.5vh, 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tilt-shell { transform: none !important; }
}
