/*
 * KALBOD Visual Foundation v0.3.0
 * A calm, editorial, light-first polish layer over Design System v1.
 */
:root{
  --kb-ink:#17191A;
  --kb-blue:#285A75;
  --kb-blue-hover:#1F4B63;
  --kb-canvas:#F7F7F3;
  --kb-surface:#FFFFFF;
  --kb-mist:#EDF1F2;
  --kb-line:#DDE1E1;
  --kb-muted:#6D7376;
  --kb-deep:#111415;
  --kb-soft-blue:#DCE8ED;
  --kb-text:var(--kb-ink);
  --kb-bg:var(--kb-canvas);
  --kb-surface-current:var(--kb-surface);
  --kb-muted-current:var(--kb-muted);
  --kb-line-current:var(--kb-line);
  --kb-accent:var(--kb-blue);
  --kb-max:1380px;
}

html{background:var(--kb-canvas)}
body{
  background:var(--kb-canvas);
  color:var(--kb-ink);
  font-family:InterKB,-apple-system,BlinkMacSystemFont,"Inter","Helvetica Neue","Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.58;
  letter-spacing:-.008em;
}
html[dir="rtl"] body{font-family:SahelKB,Sahel,Tahoma,Arial,sans-serif;letter-spacing:0}
::selection{background:var(--kb-soft-blue);color:var(--kb-ink)}

.kb-shell{width:min(calc(100% - clamp(44px,7vw,112px)),var(--kb-max))}
.kb-section{padding-block:clamp(92px,9.5vw,156px)}
.kb-eyebrow{font-size:.67rem;letter-spacing:.19em;font-weight:650;color:#747B7E;margin-bottom:28px}
.kb-eyebrow::before{width:34px;background:var(--kb-blue);opacity:.82}
.kb-lede{font-size:clamp(1.08rem,1.4vw,1.28rem);line-height:1.58;color:#626A6E;max-width:42rem}

/* header */
.kb-site-header{
  background:color-mix(in srgb,var(--kb-canvas) 91%,transparent);
  border-bottom:1px solid transparent;
}
.kb-site-header.is-scrolled{
  background:color-mix(in srgb,var(--kb-canvas) 88%,transparent);
  backdrop-filter:saturate(120%) blur(18px);
  -webkit-backdrop-filter:saturate(120%) blur(18px);
  border-bottom-color:color-mix(in srgb,var(--kb-line) 74%,transparent);
}
.kb-header-inner{height:78px}
.kb-brand{font-size:1.2rem;font-weight:700;letter-spacing:-.045em}
.kb-nav-list{gap:34px}
.kb-nav-list a,.kb-tool-link{font-size:.78rem;font-weight:500;color:#34393B;transition:color .18s ease,opacity .18s ease}
.kb-nav-list a:hover,.kb-tool-link:hover{color:var(--kb-blue)}
.kb-account-link{padding:8px 15px;background:rgba(255,255,255,.45);border-color:#D5DADA}

/* buttons / links */
.kb-button{min-height:52px;padding-inline:25px;font-size:.88rem;font-weight:600;letter-spacing:-.01em;box-shadow:none}
.kb-button-primary{background:var(--kb-blue)}
.kb-button-primary:hover{background:var(--kb-blue-hover);transform:translateY(-1px)}
.kb-text-link{font-size:.88rem;border-bottom-color:color-mix(in srgb,var(--kb-blue) 24%,transparent);transition:color .18s ease,border-color .18s ease}
.kb-text-link:hover{color:var(--kb-blue-hover);border-bottom-color:var(--kb-blue-hover)}

/* Home hero */
.kb-hero{
  min-height:min(850px,calc(100svh - 78px));
  grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);
  align-items:center;
  gap:clamp(44px,6.5vw,108px);
  padding-top:clamp(64px,6.5vw,104px);
  padding-bottom:clamp(72px,7vw,110px);
  position:relative;
}
.kb-hero::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,var(--kb-line) 8%,var(--kb-line) 92%,transparent);
}
.kb-hero-copy{align-self:center;padding-bottom:0;position:relative;z-index:2}
.kb-hero h1{
  font-size:clamp(3.7rem,6.2vw,6rem);
  line-height:.94;
  letter-spacing:-.064em;
  font-weight:640;
  margin:0 0 30px;
  max-width:10.8ch;
  text-wrap:balance;
}
html[dir="rtl"] .kb-hero h1{letter-spacing:-.025em;line-height:1.03;max-width:11ch}
.kb-hero h1 em{color:var(--kb-blue)}
.kb-hero .kb-lede{max-width:36rem}
.kb-hero .kb-actions{margin-top:34px;gap:30px}
.kb-hero-portrait{
  align-self:center;
  justify-self:end;
  width:min(100%,590px);
  background:#fff;
  border:1px solid #E4E7E6;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 26px 80px rgba(25,31,34,.055);
  position:relative;
}
.kb-hero-portrait::before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 58%,rgba(18,24,27,.025));
  pointer-events:none;z-index:1;
}
.kb-hero-portrait img{width:100%;height:auto;max-height:690px;object-fit:contain;object-position:center bottom}
.kb-hero-portrait figcaption{
  right:24px;bottom:24px;width:auto;max-width:210px;
  padding:11px 14px 11px 16px;
  background:rgba(247,247,243,.84);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.74);
  border-radius:11px;
  font-size:.73rem;
  box-shadow:0 10px 30px rgba(20,26,29,.06);
  z-index:2;
}
.kb-hero-portrait figcaption strong{font-weight:650}
.kb-hero-portrait figcaption span{color:#697074}
html[dir="rtl"] .kb-hero-portrait figcaption{left:24px;right:auto;padding:11px 16px;border:1px solid rgba(255,255,255,.74)}

/* section heads */
.kb-section-head{margin-bottom:38px;padding-bottom:15px;border-bottom:1px solid var(--kb-line)}
.kb-section-head .kb-eyebrow{margin:0}

/* selected work - editorial asymmetric layout */
.kb-work-section{background:#FBFBF8}
.kb-work-grid{
  display:grid;
  grid-template-columns:minmax(0,1.17fr) minmax(320px,.83fr);
  grid-template-rows:auto auto;
  gap:32px 30px;
}
.kb-work-card{min-width:0;padding-bottom:2px}
.kb-work-card-featured{grid-row:1 / span 2}
.kb-work-card-featured .kb-work-media{aspect-ratio:4/3}
.kb-work-card:not(.kb-work-card-featured) .kb-work-media{aspect-ratio:16/7.8}
.kb-work-media{border-radius:14px;background:#E8ECEC;border:1px solid rgba(31,33,34,.04)}
.kb-work-media img{transition:transform .55s cubic-bezier(.2,.7,.2,1),filter .3s ease}
.kb-work-media:hover img{transform:scale(1.018)}
.kb-work-meta{margin-top:17px;font-size:.66rem;letter-spacing:.16em}
.kb-work-card h2{font-size:clamp(1.25rem,1.8vw,1.75rem);letter-spacing:-.035em;margin-bottom:9px}
.kb-work-card>p:last-of-type{font-size:.92rem;line-height:1.55;max-width:48ch}
.kb-round-link{position:static;margin-top:18px;width:40px;height:40px;border-color:#D6DBDB;transition:background .18s ease,border .18s ease,transform .18s ease}
.kb-round-link:hover{background:#fff;border-color:#C4CCCF;transform:translateX(2px)}

/* approach */
.kb-approach-section{
  background:linear-gradient(135deg,#101314 0%,#15191A 52%,#111516 100%);
  padding-block:clamp(96px,10vw,164px);
  position:relative;overflow:hidden;
}
.kb-approach-section::after{
  content:"";position:absolute;width:520px;height:520px;border-radius:50%;right:-230px;top:-250px;
  background:radial-gradient(circle,rgba(40,90,117,.16),transparent 68%);pointer-events:none;
}
.kb-approach-grid{position:relative;z-index:1;grid-template-columns:1.18fr .72fr;gap:clamp(58px,10vw,170px)}
.kb-approach-section h2{font-size:clamp(2.7rem,4.9vw,4.9rem);line-height:.99;letter-spacing:-.052em;max-width:13ch}
html[dir="rtl"] .kb-approach-section h2{letter-spacing:-.02em;line-height:1.08}
.kb-approach-copy{font-size:1.04rem;line-height:1.72;max-width:42ch}

/* expertise */
.kb-expertise-section{background:var(--kb-canvas)}
.kb-expertise-grid{gap:0;margin-top:42px;border-top:1px solid var(--kb-line);border-bottom:1px solid var(--kb-line)}
.kb-expertise-grid article{
  grid-template-columns:54px 1fr;
  padding:34px 32px 38px 0;
  border-right:1px solid var(--kb-line);
}
.kb-expertise-grid article:last-child{border-right:0;padding-right:0;padding-left:32px}
.kb-expertise-grid article:nth-child(2){padding-left:32px}
html[dir="rtl"] .kb-expertise-grid article{padding:34px 0 38px 32px;border-right:0;border-left:1px solid var(--kb-line)}
html[dir="rtl"] .kb-expertise-grid article:last-child{border-left:0;padding-left:0;padding-right:32px}
html[dir="rtl"] .kb-expertise-grid article:nth-child(2){padding-right:32px}
.kb-expertise-grid article>span{font-size:2.65rem;font-weight:300;color:#CED3D3}
.kb-expertise-grid h2{font-size:1.13rem;font-weight:620;letter-spacing:-.025em;margin-bottom:17px}
.kb-expertise-grid p{font-size:.9rem;line-height:1.72;color:#747A7D;max-width:36ch}

/* products */
.kb-products-section{background:#FBFBF8;padding-top:clamp(20px,3vw,52px)}
.kb-product-list{border-top:1px solid var(--kb-line)}
.kb-product-row{padding:23px 10px;grid-template-columns:38px 1fr auto;gap:19px;transition:background .22s ease,padding .22s ease}
.kb-product-row:hover{padding-inline:18px;background:#fff}
.kb-product-mark{width:28px;height:28px;border-radius:8px;background:linear-gradient(145deg,var(--kb-blue),#3A718D)}
.kb-product-row strong{font-size:.93rem;letter-spacing:.015em}
.kb-product-row small{font-size:.8rem;color:#798083}

/* contact CTA */
.kb-contact-cta{
  width:min(calc(100% - clamp(44px,7vw,112px)),var(--kb-max));
  margin-top:clamp(18px,3vw,40px);
  margin-bottom:clamp(80px,8vw,130px);
  padding:clamp(46px,6vw,76px);
  border:1px solid #DCE1E1;
  border-radius:24px;
  background:linear-gradient(135deg,#FFFFFF 0%,#F1F5F5 100%);
  box-shadow:0 20px 60px rgba(27,33,36,.035);
}
.kb-contact-cta h2{font-size:clamp(2.25rem,4.1vw,4.2rem);max-width:14ch}

/* footer */
.kb-site-footer{background:#F2F3EF;border-top:1px solid #DDE1DF;padding-top:66px}
.kb-footer-grid{gap:42px}.kb-footer-descriptor{line-height:1.55}
.kb-footer-links a{font-size:.78rem;color:#686F72;transition:color .18s ease}.kb-footer-links a:hover{color:var(--kb-blue)}
.kb-footer-bottom{margin-top:64px;padding-block:22px 4px}

/* Editorial inner pages */
.kb-editorial-hero,.kb-archive-head{padding-top:clamp(92px,9vw,150px);padding-bottom:clamp(72px,8vw,124px)}
.kb-editorial-hero h1,.kb-archive-title{
  font-size:clamp(3.55rem,6.3vw,6.2rem);
  line-height:.95;letter-spacing:-.064em;font-weight:620;text-wrap:balance;
}
html[dir="rtl"] .kb-editorial-hero h1,html[dir="rtl"] .kb-archive-title{line-height:1.05;letter-spacing:-.025em}
.kb-page-layout,.kb-page-header{max-width:980px}

/* About */
.kb-about-hero{
  min-height:min(860px,calc(100svh - 78px));
  align-items:center;
  grid-template-columns:minmax(0,1.08fr) minmax(380px,.72fr);
  gap:clamp(52px,8vw,130px);
  padding-top:clamp(80px,8vw,128px);padding-bottom:clamp(80px,8vw,128px);
}
.kb-about-hero h1{font-size:clamp(3.45rem,5.8vw,5.8rem);line-height:.97;letter-spacing:-.058em;font-weight:620;max-width:10.5ch}
.kb-about-portrait{background:#fff;border:1px solid #E1E5E4;border-radius:20px;overflow:hidden;box-shadow:0 26px 80px rgba(25,31,34,.045)}
.kb-about-portrait img{width:100%;max-height:720px;object-fit:contain;object-position:center bottom}
.kb-two-column-statement{gap:clamp(68px,11vw,170px)}
.kb-two-column-statement h2{letter-spacing:-.045em}
.kb-about-founder-band{background:linear-gradient(135deg,#101314,#171B1C)}
.kb-foundations-grid article{padding-top:30px}.kb-foundations-grid h2{letter-spacing:-.025em}
.kb-timeline-item{padding:35px 0}.kb-timeline-item:hover{background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent)}

/* Expertise detail */
.kb-expertise-detail{padding:64px 0}.kb-expertise-summary h2{font-weight:600}.kb-expertise-detail li{padding:13px 0}
.kb-integration-band{background:linear-gradient(135deg,#101314,#151A1C)}

/* Work archive / case */
.kb-work-archive-item{padding:76px 0;gap:clamp(44px,8vw,116px)}
.kb-work-archive-media{border-radius:15px;border:1px solid rgba(31,33,34,.05)}
.kb-work-archive-copy h2{font-weight:610}
.kb-work-archive-item:hover .kb-work-archive-media img{transform:scale(1.015)}
.kb-work-archive-media img{transition:transform .5s cubic-bezier(.2,.7,.2,1)}

/* Contact */
.kb-contact-form-section{background:#FBFBF8}
.kb-contact-aside{position:sticky;top:120px}
.kb-choice-grid span{background:#fff;padding:18px 19px;border-color:#DCE1E1}
.kb-choice-grid span:hover{border-color:#BFC9CC}
.kb-field input,.kb-field textarea{background:#fff;border-color:#DCE1E1;padding:17px 17px}
.kb-field textarea{min-height:180px;resize:vertical}

/* subtle motion */
@media (prefers-reduced-motion:no-preference){
  .kb-work-card,.kb-expertise-grid article,.kb-product-row{transition:transform .25s ease,background .22s ease}
}

/* Tablet */
@media(max-width:980px){
  .kb-shell{width:min(calc(100% - 48px),var(--kb-max))}
  .kb-header-inner{height:70px}
  .kb-mobile-menu{inset:70px 0 0}
  .admin-bar .kb-mobile-menu{top:102px}
  .kb-hero{min-height:auto;grid-template-columns:minmax(0,1fr) minmax(300px,.72fr);gap:36px;padding-block:76px}
  .kb-hero h1{font-size:clamp(3.2rem,7.3vw,4.8rem)}
  .kb-hero-portrait{width:100%}
  .kb-work-grid{grid-template-columns:1fr 1fr;grid-template-rows:auto}.kb-work-card-featured{grid-column:1/-1;grid-row:auto}.kb-work-card-featured .kb-work-media{aspect-ratio:16/8}
  .kb-approach-grid{grid-template-columns:1fr;gap:54px}.kb-approach-section h2{max-width:15ch}
  .kb-expertise-grid{grid-template-columns:1fr}.kb-expertise-grid article,.kb-expertise-grid article:nth-child(2),.kb-expertise-grid article:last-child{padding:28px 0;border-right:0;border-left:0;border-bottom:1px solid var(--kb-line)}.kb-expertise-grid article:last-child{border-bottom:0}
  html[dir="rtl"] .kb-expertise-grid article,html[dir="rtl"] .kb-expertise-grid article:nth-child(2),html[dir="rtl"] .kb-expertise-grid article:last-child{padding:28px 0;border-left:0}
  .kb-about-hero{min-height:auto;grid-template-columns:1fr .72fr;gap:44px}
  .kb-contact-aside{position:static}
}

/* Mobile is composed independently, not a squeezed desktop layout */
@media(max-width:767px){
  :root{--kb-r-lg:14px}
  body{font-size:15px;line-height:1.62}
  .kb-shell{width:calc(100% - 40px)}
  .kb-section{padding-block:78px}
  .kb-header-inner{height:66px}
  .kb-mobile-menu{inset:66px 0 0;background:rgba(247,247,243,.98);backdrop-filter:blur(18px)}
  .admin-bar .kb-site-header{top:46px}.admin-bar .kb-mobile-menu{top:112px}
  .kb-brand{font-size:1.05rem}
  .kb-header-tools{gap:10px}.kb-header-tools>.kb-tool-link:not(:nth-last-of-type(2)){display:none}.kb-menu-button{margin-left:2px}
  .kb-mobile-menu-inner{padding-top:38px}.kb-mobile-menu-inner>a{font-size:clamp(2.1rem,10.5vw,3.25rem);letter-spacing:-.045em;padding-block:9px}

  .kb-hero{
    min-height:auto;display:flex;flex-direction:column;gap:0;
    width:100%;padding-top:58px;padding-bottom:0;
  }
  .kb-hero::after{display:none}
  .kb-hero-copy{width:calc(100% - 40px);margin-inline:auto;padding:0 0 42px}
  .kb-hero h1{font-size:clamp(3.05rem,14.5vw,4.2rem);line-height:.92;letter-spacing:-.064em;max-width:8.7ch;margin-bottom:22px}
  html[dir="rtl"] .kb-hero h1{font-size:clamp(2.8rem,13vw,3.75rem);line-height:1.03;letter-spacing:-.02em;max-width:10ch}
  .kb-hero .kb-lede{font-size:.99rem;line-height:1.6;max-width:30ch}
  .kb-hero .kb-actions{margin-top:28px}.kb-hero .kb-button{min-height:50px}.kb-hero .kb-text-link{display:none}
  .kb-hero-portrait{
    order:2;width:100%;max-width:none;border-radius:0;border-left:0;border-right:0;margin:0;
    box-shadow:none;background:#fff;
  }
  .kb-hero-portrait img{height:clamp(390px,112vw,530px);max-height:none;object-fit:cover;object-position:50% 20%}
  .kb-hero-portrait figcaption{display:none}

  .kb-section-head{margin-bottom:26px;padding-bottom:14px}
  .kb-work-section{padding-block:74px 80px;overflow:hidden}
  .kb-work-section .kb-shell{width:100%;margin:0}
  .kb-work-section .kb-section-head{width:calc(100% - 40px);margin-inline:auto}
  .kb-work-grid{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 20px 12px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .kb-work-grid::-webkit-scrollbar{display:none}
  .kb-work-card,.kb-work-card-featured{display:block!important;flex:0 0 84vw;scroll-snap-align:start;margin:0;padding-bottom:6px}
  .kb-work-card .kb-work-media,.kb-work-card-featured .kb-work-media{aspect-ratio:16/10;border-radius:13px}
  .kb-work-card h2{font-size:1.25rem}.kb-work-card>p:last-of-type{font-size:.87rem}.kb-round-link{display:none}

  .kb-approach-section{padding-block:78px}.kb-approach-grid{gap:38px}.kb-approach-section h2{font-size:clamp(2.5rem,12.5vw,3.55rem);line-height:1;max-width:10.2ch}.kb-approach-copy{font-size:.94rem;line-height:1.68}

  .kb-expertise-section{padding-block:78px}.kb-expertise-grid{margin-top:28px}.kb-expertise-grid article{display:grid;grid-template-columns:42px 1fr;padding:24px 0}.kb-expertise-grid article>span{font-size:1.55rem}.kb-expertise-grid h2{font-size:1.05rem;margin:0 0 8px}.kb-expertise-grid p{display:block;grid-column:2;font-size:.79rem;line-height:1.55;max-width:31ch}

  .kb-products-section{padding-block:22px 78px}.kb-product-row{grid-template-columns:30px 1fr auto;padding:17px 0}.kb-product-row:hover{padding-inline:0;background:transparent}.kb-product-row>span:nth-child(2){display:flex;flex-direction:column;gap:2px;align-items:flex-start}.kb-product-row strong{font-size:.88rem}.kb-product-row small{font-size:.71rem;line-height:1.4}

  .kb-contact-cta{width:calc(100% - 40px);margin:0 auto 72px;padding:34px 24px;border-radius:18px;grid-template-columns:1fr;gap:25px}.kb-contact-cta h2{font-size:clamp(2.05rem,10.8vw,2.75rem);line-height:.98;max-width:11ch}.kb-contact-cta .kb-button{width:100%}

  .kb-site-footer{padding-top:50px}.kb-footer-grid{grid-template-columns:1fr 1fr;gap:32px 28px}.kb-footer-grid>div:first-child{grid-column:1/-1;padding-bottom:8px}.kb-footer-bottom{margin-top:42px;gap:8px;padding-top:18px}

  .kb-editorial-hero,.kb-archive-head{padding-top:72px;padding-bottom:62px}.kb-editorial-hero h1,.kb-archive-title{font-size:clamp(3rem,14vw,4.25rem);line-height:.96;letter-spacing:-.058em}
  html[dir="rtl"] .kb-editorial-hero h1,html[dir="rtl"] .kb-archive-title{line-height:1.06;letter-spacing:-.02em}

  .kb-about-hero{display:flex;flex-direction:column;gap:0;padding-top:62px;padding-bottom:0;width:100%}.kb-about-hero-copy{width:calc(100% - 40px);margin-inline:auto;padding-bottom:42px}.kb-about-hero h1{font-size:clamp(2.95rem,13.2vw,3.85rem);max-width:10ch}.kb-about-portrait{width:100%;border-radius:0;border-left:0;border-right:0;box-shadow:none}.kb-about-portrait img{height:clamp(520px,145vw,690px);object-fit:contain;background:#fff}
  .kb-two-column-statement h2{font-size:clamp(2.25rem,10.8vw,3.05rem);line-height:1.03}
  .kb-about-founder-band{padding-block:74px}.kb-about-founder-band h2{font-size:2.55rem}.kb-prose-light{font-size:1rem;line-height:1.72}
  .kb-timeline-item{grid-template-columns:78px 1fr;gap:14px;padding:26px 0}.kb-timeline-item h3{font-size:1.05rem}.kb-timeline-item p{font-size:.84rem;line-height:1.62}

  .kb-expertise-detail{padding:38px 0}.kb-expertise-detail ul{margin-left:0}.kb-expertise-summary h2{font-size:1.9rem}
  .kb-work-archive-item{padding:48px 0}.kb-work-archive-copy h2{font-size:2.1rem}
  .kb-contact-layout{gap:52px}.kb-contact-form-section{padding-top:54px}.kb-choice-grid span{padding:17px 16px}.kb-form-step legend{font-size:2.25rem;line-height:1.08}.kb-form-actions{gap:14px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
