/* Innosoft social links · page styles
   Follows the Innosoft brand book v0.5 (https://identity.is.sa/llms.txt).
   tokens.css is the unchanged file from identity.is.sa and is loaded first. */

*,*::before,*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  margin:0;
  font:var(--is-text-17);
  color:var(--is-black-900);
  background:var(--is-white);
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
}

svg{display:block}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
:focus-visible{outline:2px solid var(--is-blue);outline-offset:2px}

/* UI icons: Lucide, outline. Stroke in viewBox units: 1.875 at 16 px. */
.ui{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.875;stroke-linecap:round;stroke-linejoin:round}
[dir="rtl"] .flip{transform:scaleX(-1)}             /* direction icons flip on a right-to-left page; logos never do */

/* ── Page frame: floating bar, main, footer. Margins 24 / 40 / 80 px. ── */
.page{
  --m:24px;        /* page margin */
  --gap:24px;      /* space between blocks */
  --row:clamp(48px,7.5vh,64px);   /* list row: grows with the window, at most 64 px */
  --col-gap:var(--is-gutter);   /* space between the two boxes */
  --side-l:max(var(--m),env(safe-area-inset-left,0px));
  --side-r:max(var(--m),env(safe-area-inset-right,0px));
  min-height:100vh;
  min-height:100dvh;             /* one screen when it fits; a short window scrolls the page */
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
}

.foot-in{width:100%;max-width:1280px;margin-inline:auto}      /* 1280 px with the margins inside */
.wrap{width:100%;max-width:calc(1280px - 2 * var(--m))}             /* .main already carries the margins */

/* The floating menu bar (Components · Navigation): 56 px high, 16 px below the top edge, at most 1200 px wide,
   the box radius, a 1 px hairline, no shadow. It never touches the window edges. The logo at the left, 24 px in. */
.top{
  position:sticky;
  top:0;
  z-index:10;
  padding:calc(16px + env(safe-area-inset-top,0px)) var(--side-r) 0 var(--side-l);
  pointer-events:none;           /* the strip around the bar lets clicks through */
}
.bar{
  pointer-events:auto;
  display:flex;
  align-items:center;
  max-width:1200px;
  height:56px;
  margin-inline:auto;
  padding:0 24px;
  border:1px solid var(--is-grey-200);
  border-radius:var(--is-radius-box);
  corner-shape:squircle;
  background:var(--is-white);
}
.logo{display:block;flex:none;position:relative;border-radius:var(--is-radius)}
.logo::after{content:"";position:absolute;inset:-10px 0}   /* 44 px touch target */
.logo img{display:block;height:24px;width:auto}

/* ── Main: the two titles, then the two boxes under them, centred between the top row and the footer. ── */
.main{
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:var(--gap) var(--side-r) var(--gap) var(--side-l);
}
.wrap{
  margin:auto;                   /* centred; safe when the content is taller than the window */
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:var(--gap);
}

/* The title: Arabic first, at the right. Then English under it on one line, at the left, in the same size.
   Arabic titles have line height 1.5 (1.6 at 28 px) and no letter-spacing. */
.title{margin:0;font:inherit}
.title .blue{color:var(--is-blue)}
.t-ar{display:block;margin-inline-start:.012em;font:600 28px/1.6 var(--is-font-arabic)}   /* the margin puts the ink of the first letter on the margin line */
.t-en{display:block;direction:ltr;text-align:left;margin-left:-.03em;white-space:nowrap;font:var(--is-text-28);letter-spacing:-.01em}   /* -.03em: the ink of the C sits on the margin line */

/* ── The list: two titled line-only boxes, Innosoft and its product. 24 px smooth radius, hairline rows. ── */
.cols{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);   /* one column below 900 px: Innosoft first, then the product */
  gap:24px;                      /* boxes sit 24 px apart */
  align-items:start;
}
@media (min-width:900px),(min-width:560px) and (max-height:440px){
  .cols{grid-template-columns:minmax(0,8fr) minmax(0,5fr);gap:var(--col-gap)}   /* the 8 : 5 split; the page is right-to-left, so the 8 sits at the right */
}                                /* a phone held sideways keeps the split too: stacked boxes would not fit its height */
@media (max-height:640px){.cols{gap:16px}}
.box{
  min-width:0;
  margin:0;
  container-type:inline-size;
  border:1px solid var(--is-grey-200);
  border-radius:var(--is-radius-box);
  corner-shape:squircle;
  background:var(--is-white);
  overflow:hidden;
}
.rows{margin:0;padding:0;list-style:none}
.rows li + li{border-top:1px solid var(--is-grey-200)}

/* The box header of the brand book: a 40 px band, the title 12 SemiBold at the start, one Geist Mono 12 meta at the end,
   a 1 px line from edge to edge. The box's own top line is part of the 40. */
.box-h{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  height:39px;
  padding:0 24px;
  border-bottom:1px solid var(--is-grey-200);
}
.box-t{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12px/16px var(--is-font);color:var(--is-black-900)}
.box-t:lang(ar){font:600 12px/20px var(--is-font-arabic)}   /* Arabic 12: line height 1.7 */
.box-m{flex:none;font:500 12px/16px var(--is-font-mono);color:var(--is-grey-600);white-space:nowrap}
@container (max-width:263px){.box-m{display:none}}   /* a narrow box keeps its title and drops the meta */
.link{
  --inset:24px;
  display:flex;
  align-items:center;
  gap:16px;
  height:var(--row);
  padding:0 var(--inset);
  color:inherit;
  text-decoration:none;
  transition:background-color var(--is-dur-fast) var(--is-ease),color var(--is-dur-fast) var(--is-ease);
}
.link:focus-visible{outline-offset:-2px}
.glyph{flex:none;width:24px;height:24px;fill:currentColor}   /* platform marks: one ink color, never a brand color */
.name{flex:0 1 auto;min-width:0;margin-inline-end:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.handle{
  flex:0 100 auto;               /* the handle gives way before the name does */
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:500 12px/16px var(--is-font-mono);
  color:var(--is-grey-600);
}
.link .ui{margin-inline:-8px -4px;color:var(--is-grey-600);transition:color var(--is-dur-fast) var(--is-ease)}   /* -4px: the ink of the arrow, not its box, sits 24 px from the edge */
.link:active{background:var(--is-grey-50);color:var(--is-blue)}
@media (hover:hover){
  .link:hover{background:var(--is-grey-50);color:var(--is-blue)}
  .link:hover .ui{color:var(--is-blue)}
}

/* A narrow box shows less: first no handle (a cut handle says nothing), then no arrow. */
@container (max-width:319px){
  .handle{display:none}
  .link .ui{margin-inline-start:0}
}
@container (max-width:199px){
  .link{--inset:16px;gap:8px}
  .link .ui{display:none}
}
@container (max-width:139px){
  .link{--inset:8px}
}

/* ── Footer: #070707. The reversed lockup and the links (12 px Medium, white) in one row. ── */
.foot{background:var(--is-black-950);color:var(--is-white)}
.foot-in{padding:16px var(--side-r) calc(16px + env(safe-area-inset-bottom,0px)) var(--side-l)}
.foot-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.foot-links{display:flex;gap:8px}
.foot-links a{
  position:relative;
  padding:0 8px;
  color:var(--is-white);
  font:var(--is-text-12);
  text-decoration:none;
  border-radius:var(--is-radius-button);
  corner-shape:squircle;
  transition:color var(--is-dur-fast) var(--is-ease);
}
.foot-links a:last-child{margin-right:-8px}               /* the ink of the last link sits on the margin line */
.foot-links a::after{content:"";position:absolute;inset:-14px 0}   /* 44 px touch target */
@media (hover:hover){.foot-links a:hover{color:var(--is-blue)}}
.foot .logo img{height:24px}

/* ── Sizes. The titles step down the scale on small screens: 72 → 44 → 28. ── */
@media (max-width:399px){
  .page{--col-gap:16px}
}
@media (max-width:359px){
  .page{--col-gap:8px}
}
@media (min-width:640px){
  .page{--m:40px}
}
@media (min-width:640px) and (min-height:560px){
  .page{--gap:40px}
  .t-ar{margin-inline-start:.022em;font:700 44px/1.5 var(--is-font-arabic)}
  .t-en{font:var(--is-text-44);letter-spacing:-.02em}
}

@media (min-width:1100px){
  .page{--m:80px}
}
@media (min-width:1100px) and (min-height:700px){
  .t-ar{font:700 72px/1.5 var(--is-font-arabic)}
  .t-en{font:var(--is-text-72);letter-spacing:-.025em}
}
/* Boxes of 5 rows or more need the height: the titles stay at 44 until the window is 840 px high. */
@media (min-width:1100px) and (min-height:700px) and (max-height:839px){
  :where(.wrap:has(.rows > li:nth-child(5))) .t-ar{font:700 44px/1.5 var(--is-font-arabic)}
  :where(.wrap:has(.rows > li:nth-child(5))) .t-en{font:var(--is-text-44);letter-spacing:-.02em}
}

/* Short windows: tighter rows and gaps, so one screen still holds everything. */
@media (max-height:640px){
  .page{--row:44px;--gap:16px}
  .foot-in{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}   /* the footer row stays a 40 px target */
}
/* A phone held sideways: the two titles share one line, Arabic at the right and English at the left. */
@media (min-width:560px) and (max-height:440px){
  .page{--gap:8px}               /* the tightest gaps on the scale, so a header and four rows still fit */
  .main{padding-top:0;padding-bottom:0}
  .title{display:flex;align-items:baseline;justify-content:space-between;gap:24px}
}

/* The smallest phones (below 360 px): the English title in Geist is wider than the column, so it may wrap,
   and the gaps step down to 8 px so the page still fits one screen. */
@media (max-width:359px){
  .page{--gap:8px}
  .cols{gap:8px}
  .t-en{white-space:normal}
}

/* ── Motion: one entrance, 24 px, once. Off with reduced motion. ── */
@media (prefers-reduced-motion:no-preference){
  .rise{animation:rise var(--is-dur-slow) var(--is-ease-out) both;animation-delay:calc(var(--i,0) * 70ms)}
  @keyframes rise{from{opacity:0;transform:translateY(24px)}}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none !important;animation:none !important}
}
