:root {
  --bg: #F2F4FA;
  --surface: #E9ECF7;
  --ink: #0A0F1F;
  --muted: #566089;
  --accent: #FFB020;
  --accent-ink: #0A0F1F;
  --field-1: #0A0F1F;
  --field-1-ink: #ffffff;
  --field-2: #E3E7F5;
  --field-2-ink: #0A0F1F;
  --tint: #C9CFE6;
  --ink-deep: #0A0F1F;
  --navy: #141B36;
  --uv: #6B4EFF;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-big: clamp(2.75rem, 1.2rem + 6vw, 6.5rem);

  --m: 20px;
  --g: 8px;
  --r: 8px;
  --row: 90px;
  --font: 'Sora', 'Cairo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-padding-top: 64px; }
body {
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3, .display {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.18; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: var(--r);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), background-color .2s;
}
.btn:hover { transform: translateY(-2px); background: #ffa83f; }
.btn:active { transform: translateY(0) scale(.98); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--ink-deep); }
.link { font-weight: 500; transition: color .2s; }
.link:hover { color: var(--accent); }

/* ---------- sticky bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 8px var(--m);
  background: var(--surface);
}
.bar nav { display: flex; gap: 28px; }
.bar .btn { min-height: 40px; padding: 0 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; direction: ltr; line-height: 1; }
.brand svg { width: 1.45em; height: 1.45em; --b: currentColor; --a: var(--accent); flex: none; }
.wm { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.04em; font-size: 1.5rem; }
.wm i { font-style: normal; position: relative; }
.wm i::before { content: ""; position: absolute; width: .17em; height: .17em; background: currentColor; left: 50%; top: .08em; transform: translateX(-50%); }
.wm i:last-of-type::before { background: var(--accent); }

/* ---------- hero sheet ---------- */
.hero { position: relative; padding-top: 56px; height: 100svh; min-height: 700px; max-height: 1100px; overflow: hidden; background: var(--bg); }
.sheet { position: relative; height: 100%; padding: 8px var(--m) 0; }
.sheet-in {
  --cw: calc((100% - 5 * var(--g) * 1.5) / 6);
  position: relative; height: 100%;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: calc(var(--g) * 1.5);
  clip-path: inset(0 0 0 0);
}
.col { display: flex; flex-direction: column; gap: calc(var(--g) * 1.5); margin-top: var(--off); will-change: transform; }
.fr { display: flex; flex-direction: column; flex: none; overflow: hidden; border-radius: var(--r); }
.fr .body { flex: 1; min-height: 0; overflow: hidden; }
.fr .strip { height: 28px; flex: none; display: flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 500; }
.strip::after { content: attr(data-t); }
.s0 .strip { background: var(--navy); color: #fff; }
.s1 .strip { background: var(--accent); color: var(--ink); }
.s2 .strip { background: var(--uv); color: #fff; }
.s3 .strip { background: var(--field-1); color: #fff; }
.hole { flex: none; height: 410px; }
.panel {
  position: absolute; z-index: 3;
  top: 28%; inset-inline-start: calc(2 * (var(--cw) + var(--g) * 1.5));
  width: calc(2 * var(--cw) + var(--g) * 1.5); height: 410px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 24px; border-radius: var(--r);
  background: var(--field-1); color: #fff;
}
.panel .brand .wm { font-size: 2rem; }
.panel h1 { font-size: clamp(2rem, 1.2rem + 1.6vw, 2.75rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; max-width: 22ch; }
.panel p { font-size: 1.125rem; line-height: 1.5; color: #fff; max-width: 34ch; }
.panel .links { margin-top: auto; display: flex; gap: 22px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.panel .links a:hover { color: var(--accent); }

/* ---------- ui fragments ---------- */
.ui { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 10px; font-size: 13px; line-height: 1.35; overflow: hidden; }
.ui-light { background: var(--surface); color: var(--ink); }
.ui-white { background: #fff; color: var(--ink); outline: 0; }
.ui-dark { background: #0A0F1F; color: #fff; }
.ui-ink { background: var(--navy); color: #fff; }
.ui-tan { background: var(--field-2); color: var(--ink); }
.ui .t { font-weight: 600; font-size: 14px; }
.ui .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 4px; background: rgba(31,43,77,.07); }
.ui-dark .row, .ui-ink .row { background: rgba(255,255,255,.1); }
.ui .chip { padding: 1px 8px; border-radius: 99px; font-size: 13px; font-weight: 500; background: var(--accent); color: var(--ink); white-space: nowrap; }
.ui .chip.ok { background: #BFE8C9; }
.ui .chip.bl { background: var(--tint); }
.ui .kpi { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.ui .grow { flex: 1; min-height: 0; }
.ui svg { width: 100%; height: 100%; }
.ui pre, pre.code { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.55; direction: ltr; text-align: left; white-space: pre; overflow: hidden; }
.code .k { color: #FFB020; } .code .s { color: #9fe0b2; } .code .f { color: #9db6ff; } .code .c { color: #8791ad; }
.win { display: flex; flex-direction: column; height: 100%; }
.win .tb { display: flex; justify-content: space-between; padding: 6px 10px; background: var(--navy); color: #fff; font-size: 13px; }
.win .tb span:last-child { letter-spacing: 3px; }
.win .wb { flex: 1; display: grid; grid-template-columns: 34% 1fr; min-height: 0; }
.win .side { background: var(--field-2); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.win .side b { font-weight: 500; padding: 4px 6px; border-radius: 4px; }
.win .side b.on { background: var(--ink); color: #fff; }
.win .main { background: #fff; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.win .main .tot { margin-top: auto; background: var(--accent); color: var(--ink); text-align: center; font-weight: 600; padding: 7px; border-radius: 4px; }
.phone { height: 100%; display: flex; justify-content: center; align-items: flex-end; padding-top: 14px; }
.phone .dev { width: min(78%, 190px); height: 100%; background: var(--field-1); border-radius: 26px 26px 0 0; padding: 7px 7px 0; }
.phone .scr { height: 100%; border-radius: 20px 20px 0 0; overflow: hidden; position: relative; background: var(--field-2); color: var(--ink); display: flex; flex-direction: column; }
.phone .scr .map { flex: 1; min-height: 0; }
.phone .scr .card { background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.phone .scr .hd { padding: 14px 12px 6px; font-weight: 600; font-size: 15px; }
.phone .scr .li { margin: 0 8px 6px; padding: 7px 9px; border-radius: 6px; background: #fff; display: flex; justify-content: space-between; gap: 6px; }
.store .nav { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--field-1); color: #fff; font-size: 13px; }
.store .grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; background: #fff; }
.store .p { display: flex; flex-direction: column; justify-content: flex-end; border-radius: 4px; padding: 6px; font-size: 13px; font-weight: 500; }
.kb { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; min-height: 0; }
.kb div { background: rgba(31,43,77,.08); border-radius: 4px; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.kb b { font-weight: 600; }
.kb span { background: #fff; padding: 4px 5px; border-radius: 3px; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 6px; min-height: 0; }
.bars i { flex: 1; background: var(--ink); border-radius: 3px 3px 0 0; display: block; }
.bars i.h { background: var(--accent); }
.chat .m { max-width: 85%; padding: 6px 9px; border-radius: 8px; }
.chat .u { align-self: flex-start; background: rgba(255,255,255,.14); }
.chat .a { align-self: flex-end; background: var(--accent); color: var(--ink); }
.term { color: #d7def5; }
.term .ok { color: #9fe0b2; }

/* ---------- generic section ---------- */
.sec { padding: clamp(80px, 11vw, 190px) var(--m) 0; }
.sec h2 { font-size: var(--step-head); max-width: 16ch; }
.sec .lead { font-size: var(--step-lead); line-height: 1.5; max-width: 34ch; }

/* ---------- about ---------- */
.about-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); align-items: start; }
.about-head h2 { grid-column: 1 / span 7; }
.about-head .lead { grid-column: 1 / span 6; margin-top: 24px; grid-row: 2; }
.about-head .about-note { grid-column: 1 / span 6; grid-row: 3; margin-top: 28px; }
.about-note p { font-size: var(--step-body); max-width: 40ch; }
.about-tiles { margin-top: 72px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.photo { grid-column: 1 / span 8; position: relative; border-radius: var(--r); overflow: hidden; background: var(--field-1); aspect-ratio: 16 / 10; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .paper { position: absolute; top: 0; inset-inline-end: 0; width: 330px; padding: 22px; background: var(--bg); font-size: 1rem; border-radius: 0 0 0 var(--r); }
html[dir="rtl"] .photo .paper { border-radius: 0 0 var(--r) 0; }
.about-r { grid-column: 9 / span 4; display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.cstile { background: var(--field-2); border-radius: var(--r); min-height: 240px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; font-size: 1rem; }
.facts b { display: block; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.facts span { color: var(--muted); font-size: 15px; }

/* ---------- board ---------- */
.board { margin-top: 56px; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: var(--row); gap: var(--g); }
.tile { border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; min-width: 0; }
.tile h3 { font-size: var(--step-lead); line-height: 1.15; }
.tile p, .tile li { font-size: 1rem; line-height: 1.5; }
.tile.dark { background: var(--field-1); color: var(--field-1-ink); }
.tile.ink { background: var(--navy); color: #fff; }
.tile.tan { background: var(--field-2); color: var(--field-2-ink); }
.tile.sur { background: var(--surface); }
.tile.tint { background: var(--tint); }
.tile.uv { background: var(--uv); color: #fff; }
.tile .big { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
html[lang="ar"] .tile .big { letter-spacing: 0; line-height: 1.1; }
.b-code { grid-column: span 6; grid-row: span 4; }
.b-arch { grid-column: span 6; grid-row: span 2; }
.b-a { grid-column: span 3; grid-row: span 2; }
.b-phone { grid-column: span 3; grid-row: span 4; padding-bottom: 0; }
.b-pay { grid-column: span 6; grid-row: span 2; }
.b-ai { grid-column: span 3; grid-row: span 4; }
.tabs { display: flex; gap: 8px; }
.tab { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r); background: rgba(255,255,255,.12); color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .2s, color .2s; }
.tab:hover { background: rgba(255,255,255,.22); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--ink); }
.b-code pre { flex: 1; padding: 16px; background: #0A0F1F; border-radius: 6px; overflow: auto; font-size: 14px; }
.stack li { display: flex; justify-content: space-between; padding: 3px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: var(--ink); color: #fff; padding: 6px 12px; border-radius: var(--r); font-weight: 500; font-size: 1rem; }
.tile.dark .chips span { background: rgba(255,255,255,.14); }

/* ---------- work ---------- */
.work-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.work-head p { max-width: 38ch; font-size: var(--step-body); }
.projects { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g); }
.proj { background: var(--surface); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; transition: transform .3s cubic-bezier(.2,.7,.2,1), background-color .3s; }
.proj:hover { transform: translateY(-4px); background: var(--field-2); }
.proj .pv { height: 230px; flex: none; overflow: hidden; }
.proj .pt { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.proj h3 { font-size: 1.375rem; line-height: 1.2; }
.proj p { font-size: 1rem; }
.proj .m { margin-top: auto; font-weight: 600; color: var(--ink); }
.proj .tags { font-size: 14px; color: var(--muted); direction: ltr; text-align: start; }

.spines-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.spines-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); max-width: none; }
.spines-head p { font-size: 1rem; max-width: 48ch; }
.shelf { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--g); padding: 0; list-style: none; }
.spine { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 124px; padding: 16px; border-radius: var(--r); color: var(--ink); cursor: default; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.spine b { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.spine em { font-style: normal; font-size: 14px; font-weight: 600; opacity: .75; }
.spine:hover, .spine:focus-visible { transform: scale(1.06); position: relative; z-index: 1; opacity: 1; }
.d-web { background: var(--accent); } .d-win { background: var(--field-2); } .d-mob { background: var(--tint); } .d-sys { background: var(--ink); color: #fff; }

/* ---------- how ---------- */
.how { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); }
.how h2 { grid-column: 1 / span 6; }
.how p.lead { grid-column: 1 / span 5; margin-top: 20px; font-size: 1.0625rem; }
.how-fig { position: relative; margin-top: 48px; background: var(--surface); border-radius: var(--r); }
.how-svg { width: 100%; aspect-ratio: 900 / 270; }
.how-cols { position: absolute; inset: auto 0 0 0; padding: 0 28px 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-cols b { display: block; font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }
.how-cols span { font-size: 1rem; max-width: 36ch; display: block; }
.sq { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity 1s; }

/* ---------- pricing ---------- */
.plans-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); align-items: end; }
.plans { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g); align-items: end; }
.plans-head h2 { grid-column: 1 / span 7; }
.plan { border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.plan .pb { flex: 1; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.plan h3 { font-size: 1.75rem; line-height: 1.1; }
.plan .price { font-size: 3.5rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.plan .price small { font-size: 1.125rem; font-weight: 500; letter-spacing: 0; }
.plan ul { margin-top: 10px; display: grid; gap: 4px; font-size: 1.0625rem; }
.plan:nth-child(1) { height: 360px; background: var(--field-2); color: var(--ink); }
.plan:nth-child(2) { height: 480px; background: var(--navy); color: #fff; }
.plan:nth-child(3) { height: 600px; background: var(--field-1); color: #fff; }
.plan .go { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-weight: 600; border: 0; font-size: 1rem; cursor: pointer; width: 100%; text-align: start; transition: padding .25s; }
.plan:nth-child(1) .go { background: #C9CFE6; color: var(--ink); }
.plan:nth-child(2) .go { background: var(--ink-deep); color: #fff; }
.plan:nth-child(3) .go { background: var(--accent); color: var(--ink); }
.plan .go:hover { padding: 0 36px; }

.calc { margin-top: clamp(80px, 9vw, 150px); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); align-items: stretch; }
.calc-l { grid-column: 1 / span 8; display: grid; gap: var(--g); }
.calc-r { grid-column: 9 / span 4; align-self: stretch; }
.calc h3 { font-size: 1.375rem; margin-bottom: 4px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opt { text-align: start; border: 0; border-radius: var(--r); background: #fff; color: var(--ink); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 76px; transition: background-color .2s, color .2s, transform .2s; }
.opt:hover { transform: translateY(-2px); }
.opt b { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.opt span { font-size: 14px; color: var(--muted); }
.opt .pr { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 1rem; color: var(--ink); }
.opt[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.opt[aria-pressed="true"] span, .opt[aria-pressed="true"] .pr { color: var(--ink); }
.range { width: 100%; accent-color: var(--accent); height: 36px; cursor: pointer; }
.range-l { display: flex; justify-content: space-between; font-size: 14px; color: #fff; }
.sum { background: var(--field-1); color: #fff; border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sum .tot { font-size: 3.25rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.sum ul { display: grid; gap: 4px; font-size: 15px; }
.sum li { display: flex; justify-content: space-between; gap: 10px; }
.inp { width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: var(--r); background: rgba(255,255,255,.12); color: #fff; font-size: 1rem; }
.inp::placeholder { color: #C9CFE6; }
.sum .btn { width: 100%; }

/* ---------- cta ---------- */
.cta { margin-top: clamp(80px, 11vw, 190px); display: grid; grid-template-columns: 1fr minmax(0, 8fr) 1fr; gap: 14px; height: 400px; }
.cta > * { border-radius: var(--r); overflow: hidden; }
.cta .fl { margin-inline: calc(-1 * var(--m) - 10px) 0; }
.cta .fl:last-child { margin-inline: 0 calc(-1 * var(--m) - 10px); }
.cta img { width: 100%; height: 100%; object-fit: cover; }
.cta-c { background: var(--navy); color: #fff; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta-t { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.cta-s { display: grid; gap: 14px; min-width: 260px; }
.cta-s b { display: block; font-size: 1.25rem; font-weight: 600; }
.cta-s span { font-size: 1rem; }
.cta-c h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); max-width: 18ch; }
.cta-c p { font-size: 1.0625rem; max-width: 46ch; }

/* ---------- footer ---------- */
footer { margin-top: clamp(80px, 9vw, 150px); padding: 0 var(--m) 20px; }
.mark { display: flex; gap: 4px; align-items: flex-end; height: 34svh; min-height: 220px; direction: ltr; }
.mark b { flex: 1; min-height: 62%; display: flex; align-items: flex-start; justify-content: center; font-weight: 700; font-size: min(12vw, 18svh); letter-spacing: -0.04em; line-height: 1; padding-top: 0; overflow: hidden; border-radius: var(--r); font-family: 'Sora', sans-serif; }
.mark b:nth-child(1) { height: 100%; background: var(--ink); color: var(--bg); }
.mark b:nth-child(2) { height: 86%; background: var(--accent); color: var(--bg); }
.mark b:nth-child(3) { height: 92%; background: var(--field-2); color: var(--ink); }
.mark b:nth-child(4) { height: 76%; background: var(--field-1); color: var(--bg); }
.mark b:nth-child(5) { height: 86%; background: var(--tint); color: var(--ink); }
.mark b:nth-child(6) { height: 100%; background: var(--ink); color: var(--bg); }
.mark b:nth-child(7) { height: 82%; background: var(--field-1); color: var(--bg); }
.foot-g { margin-top: 56px; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--g); font-size: 15px; }
.foot-l { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.foot-l ul { display: grid; gap: 8px; align-content: start; }
.foot-l b { font-weight: 600; font-size: 1rem; }
.foot-c { grid-column: 9 / span 4; display: grid; gap: 8px; align-content: start; }
.foot-b { margin-top: 48px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot-b .btn { min-height: 40px; padding: 0 18px; }

/* ---------- motion ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
.js .rv.in { opacity: 1; transform: none; }
.js .sheet-in { clip-path: inset(0 0 100% 0); }
.js.go .sheet-in { clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(.7,0,.2,1); }
.js .fr .body { transform: scale(1.12); }
.js.go .fr .body { transform: none; transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.js .panel { opacity: 0; transform: translateY(20px); }
.js.go .panel { opacity: 1; transform: none; transition: opacity .8s .7s, transform .8s .7s cubic-bezier(.2,.7,.2,1); }
.draw path.ln { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(.4,0,.2,1) .4s; }
.go .draw path.ln, .in .draw path.ln { stroke-dashoffset: 0; }
@keyframes blink { 50% { opacity: 0; } }
.cur { animation: blink 1s steps(1) infinite; }
@keyframes drift { to { transform: translateY(-12px); } }
.b-phone .dev { animation: drift 4s ease-in-out infinite alternate; }
.rt-pulse { animation: pulse 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .panel { opacity: 1; transform: none; transition: none; }
  .js .sheet-in { clip-path: none; transition: none; }
  .js .fr .body { transform: none; }
  .draw path.ln { stroke-dashoffset: 0; transition: none; }
  .cur, .b-phone .dev, .rt-pulse { animation: none; }
  .col { transform: none !important; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .calc-l { grid-column: 1 / -1; } .calc-r { grid-column: 1 / -1; position: static; }
  .bar nav { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 800px) {
  :root { --m: 12px; }
  .hero { height: auto; min-height: 0; max-height: none; }
  .sheet { padding-bottom: 8px; }
  .sheet-in { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: auto; align-items: start; }
  .panel { position: static; grid-column: 1 / -1; order: -1; width: 100%; height: auto; min-height: 44svh; margin-top: 12px; }
  .panel .brand .wm { font-size: 2.25rem; }
  .panel .btn { width: 100%; }
  .panel .links { margin-top: 18px; }
  .panel h1 { max-width: none; }
  .js .sheet-in { clip-path: none; }
  .col { gap: 8px; }
  .col:nth-child(n+3) { display: none; }
  .col:nth-child(1) { margin-top: 0 !important; }
  .col:nth-child(2) { margin-top: 60px !important; }
  .hole { display: none; }
  .col .fr { height: 250px !important; }
  .col .fr:nth-child(n+3) { display: none; }
  .about-head h2, .about-head .lead, .about-head .about-note { grid-column: 1 / -1; grid-row: auto; }
  .about-head .about-note { margin-top: 20px; }
  .about-tiles { margin-top: 36px; gap: 8px; }
  .photo, .about-r { grid-column: 1 / -1; }
  .photo { aspect-ratio: 4 / 3; }
  .photo .paper { position: static; width: 100%; padding: 18px 0 0; background: none; }
  .photo { overflow: visible; aspect-ratio: auto; background: none; }
  .photo img { aspect-ratio: 4 / 3; border-radius: var(--r); }
  .board { grid-auto-rows: auto; grid-template-columns: 1fr 1fr; }
  .board > .tile { grid-column: 1 / -1; grid-row: auto; min-height: 0; }
  .board > .b-a { grid-column: span 1; }
  .b-code pre { min-height: 260px; }
  .projects { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: 1fr 1fr; }
  .spine { min-height: 104px; padding: 14px; gap: 20px; }
  .spine b { font-size: 1rem; }
  .how h2, .how p.lead { grid-column: 1 / -1; }
  .how-fig { background: none; }
  .how-svg { aspect-ratio: 3 / 2; background: var(--surface); border-radius: var(--r); }
  .how-cols { position: static; padding: 18px 0 0; grid-template-columns: 1fr; gap: 18px; }
  .plans-head h2 { grid-column: 1 / -1; }
  .plans { grid-template-columns: 1fr; align-items: stretch; }
  .plan { height: auto !important; }
  .plan .price { font-size: 2.75rem; }
  .opts { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr 1fr; height: auto; gap: 8px; }
  .cta-c { grid-column: 1 / -1; grid-row: 1; padding: 28px 20px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta .fl, .cta .fl:last-child { margin: 0; height: 120px; }
  .foot-l, .foot-c, .foot-g { grid-column: 1 / -1; }
  .foot-l { grid-template-columns: 1fr 1fr; }
  .foot-c { margin-top: 24px; }
  .mark { height: 22svh; }
  .mark b { font-size: 18vw; }
}

#contact { overflow: clip; }
@media (max-width: 800px) { :root { --m: 16px; } }

.sum .incl { margin-top: 8px; display: grid; gap: 8px; font-size: 1rem; }
.sum .incl ul { font-size: 1rem; gap: 6px; }
.sum .incl b { font-weight: 600; font-size: 1.125rem; }

.foot-b .brand .wm { font-size: 1.25rem; }

.ui > .row, .win .main > .row { flex: 1 1 0; max-height: 50px; }
.chat { justify-content: center; gap: 12px; }
.hero .panel { top: calc(28svh + 4px); }
@media (max-width: 800px) { .hero .panel { top: auto; } .hero { padding-top: 56px; } .sheet { padding-top: 0; } .panel { margin-top: 8px; } .panel .links { margin-top: 12px; } }
bdi { margin-inline-start: .14em; }

/* ---------- multi-page ---------- */
.bar nav .link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
body.sub main { padding-top: 56px; }
.pg-head { padding-top: clamp(56px, 7vw, 110px); }
.pg-head h1 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5rem); max-width: 16ch; }
.pg-head .lead { margin-top: 20px; }
.facts4 { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--g); }
.facts4 .tile { min-height: 190px; justify-content: space-between; }
.facts4 b { font-size: var(--step-lead); font-weight: 600; line-height: 1.15; }
.facts4 span { font-size: 1rem; }
.feats { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g); }
.feats .tile { min-height: 220px; justify-content: space-between; }
.projects.p3 { grid-template-columns: repeat(3, 1fr); }
.work-head .btn { flex: none; }
@media (max-width: 1100px) { .projects.p3 { grid-template-columns: 1fr 1fr; } .facts4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) {
  .facts4, .feats, .projects.p3 { grid-template-columns: 1fr; margin-top: 28px; }
  .facts4 .tile, .feats .tile { min-height: 0; gap: 16px; }
  .pg-head h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); }
}

.photo .art { position: absolute; inset: 0; background: var(--field-1); display: grid; place-items: center; }
.photo .art svg { width: min(46%, 380px); height: auto; --b: #F2F4FA; --a: var(--accent); }
@media (max-width: 800px) { .photo .art { position: static; aspect-ratio: 4 / 3; border-radius: var(--r); } }

.cta .fl img { object-position: top center; }

.sum-shots { margin-top: auto; padding-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum-shots img { width: 100%; height: 200px; object-fit: cover; object-position: top; border-radius: 6px; }

.shots { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--g); }
.shots figure { display: grid; gap: 10px; }
.shots img { width: 100%; height: 300px; object-fit: cover; object-position: top; border-radius: var(--r); }
.shots figcaption { font-size: 1rem; font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.opt, .sum li { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.opt:nth-child(2) { animation-delay: .05s; } .opt:nth-child(3) { animation-delay: .1s; } .opt:nth-child(4) { animation-delay: .15s; } .opt:nth-child(5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .opt, .sum li { animation: none; } }
@media (max-width: 800px) { .shots { grid-template-columns: 1fr; } .shots img { height: 240px; } }

.how p.lead { max-width: 60ch; }

@media (min-width: 801px) and (max-width: 1100px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .spine:hover, .spine:focus-visible { transform: none; } }

/* ---------- hero: whole fragments, no cropping ---------- */
.hero { height: auto; min-height: 0; max-height: none; overflow: visible; padding-bottom: 8px; }
.sheet { height: auto; }
.sheet-in { height: auto; align-items: stretch; }
.col { margin-top: 0; transform: none !important; }
.mid { grid-column: span 2; display: flex; flex-direction: column; gap: calc(var(--g) * 1.5); }
.mid-g { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: calc(var(--g) * 1.5); }
.mid .panel { position: static; width: auto; height: auto; min-height: 340px; justify-content: center; }
.col .fr, .mid-g .fr { height: auto !important; min-height: 0 !important; }
.col .fr .body, .mid-g .fr .body { flex: none; }
.col .fr:last-child, .mid-g .fr { flex: 1 1 auto; }
.col .fr:last-child .body, .mid-g .fr .body { flex: 1; }
.ui { height: auto; min-height: 100%; }
@media (max-width: 800px) {
  .mid { display: contents; }
  .mid-g { display: none; }
  .col.a5, .col.a6 { display: none; }
  .col:nth-child(2) { margin-top: 0 !important; }
  .sheet-in { align-items: stretch; }
  .col .fr:nth-child(2) { flex: 1 1 auto; }
  .col .fr:nth-child(2) .body { flex: 1; }
  .col .fr:nth-child(n+3) { display: none; }
  .hero .panel { min-height: 0; justify-content: flex-start; padding: 24px 20px; }
}

/* ---------- hover life ---------- */
.ui .row { transition: background .25s; }
.ui .row.hl { background: rgba(255,176,32,.38); }
.ui .chip { transition: background .25s; }
.kb span { transition: background .25s; }
.kb span.tick { background: #BFE8C9; }
.store .p { transition: transform .3s; }
.store .p.pop { transform: scale(1.06); }
pre .cl { transition: opacity .25s, background .2s; }
pre.hlon .cl { opacity: .4; }
pre.hlon .cl.on { opacity: 1; background: rgba(255,176,32,.2); }

/* ---------- immersive home (flight) ---------- */
body.home { background: #05070F; }
body.home .bar { background: rgba(5,7,15,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; }
body.home .bar .link { color: #fff; }
body.home .bar .link:hover { color: var(--accent); }
.flight { position: relative; background: #05070F; color: #fff; }
.stage { position: relative; min-height: 100svh; padding-top: 56px; overflow: hidden; background: radial-gradient(120% 80% at 50% 110%, #2a1f6b 0%, #0A0F1F 48%, #05070F 100%); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s; display: none; }
#gl.on { opacity: 1; }
.deck, .dots, .hint { display: none; }
.sc { position: relative; padding: 14vh var(--m); }
.sc .tx { max-width: 520px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.sc h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5.5rem); }
.sc h2 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4.25rem); }
.sc h1, .sc h2, .sc p, .sc .mt { text-shadow: 0 2px 28px rgba(5,7,15,.9), 0 0 6px rgba(5,7,15,.6); }
.sc p { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: rgba(255,255,255,.88); max-width: 40ch; }
.sc .mt { font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.sc .acts { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.24); }
.sc.s0 .tx, .sc.s6 .tx { align-items: center; text-align: center; max-width: 780px; margin-inline: auto; }

.fly .flight { height: 760svh; }
.fly .stage { position: sticky; top: 0; height: 100svh; min-height: 0; padding-top: 0; }
.fly #gl { display: block; }
.fly .deck { display: block; position: absolute; inset: 0; perspective: 900px; perspective-origin: 50% 42%; pointer-events: none; }
.fly .fcard { position: absolute; left: 50%; top: 50%; width: min(300px, 66vw); opacity: 0; visibility: hidden; will-change: transform, opacity; }
.fly .fcard .fr { border-radius: 10px; }
.fly .scenes { position: absolute; inset: 0; z-index: 3; }
.fly .sc { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 56px 6vw 0; pointer-events: none; opacity: 0; will-change: transform, opacity; }
.fly .sc.s0 { opacity: 1; }
.fly .sc.on { pointer-events: auto; }
.fly .sc:nth-child(even) .tx { align-self: flex-start; }
.fly .sc:nth-child(odd) .tx { align-self: flex-end; }
.fly .sc.s0 .tx, .fly .sc.s6 .tx { align-self: center; }
.fly .dots { display: flex; flex-direction: column; gap: 6px; position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); z-index: 5; }
.fly .dots button { width: 18px; height: 18px; padding: 6px; border: 0; background: rgba(255,255,255,.35); background-clip: content-box; cursor: pointer; border-radius: 0; }
.fly .dots button.on { background: var(--accent); background-clip: content-box; }
.fly .hint { display: block; position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 15px; color: #fff; z-index: 4; pointer-events: none; }
@media (max-width: 1000px) {
  .fly .sc { justify-content: flex-end; padding: 56px var(--m) 14svh; }
  .fly .sc .tx, .fly .sc:nth-child(n) .tx { align-self: stretch; max-width: none; }
  .fly .stage::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(transparent, rgba(5,7,15,.88)); z-index: 2; pointer-events: none; }
  .fly .sc.s0 .tx, .fly .sc.s6 .tx { align-items: flex-start; text-align: start; }
  .fly .dots { inset-inline-end: 4px; }
  .fly .fcard { width: min(240px, 62vw); }
}
@media (prefers-reduced-motion: reduce) { #gl { transition: none; } }

/* nav stays reachable on tablet and phone */
@media (max-width: 1100px) { .bar nav { display: flex; gap: 18px; } }
@media (max-width: 700px) { .bar nav { gap: 12px; font-size: 14px; } .bar > .btn { display: none; } .bar .wm { font-size: 1.25rem; } }

/* dark footer on the home page */
body.home footer { background: #05070F; color: #fff; --ink: #fff; --muted: #aab2d4; --bg: #05070F; --surface: #0A0F1F; }
body.home footer .btn.dark { background: rgba(255,255,255,.14); }
body.home footer { --field-1: #141B36; }
body.home .mark b:nth-child(4), body.home .mark b:nth-child(7) { color: #fff; }

/* ---------- dark theme for the inner pages ---------- */
html { background: #05070F; }
body.sub {
  --bg: #05070F; --surface: #0F1530; --ink: #fff; --muted: #aab2d4;
  --field-1: #0F1530; --field-1-ink: #fff; --field-2: #19204A; --field-2-ink: #fff; --tint: #222C63;
  --navy: #141B36; --ink-deep: #0A0F1F;
  background: #05070F; color: #fff;
}
body.sub main, body.sub footer { position: relative; z-index: 1; }
#glbg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity 1.4s; pointer-events: none; }
#glbg.on { opacity: .38; }
body.sub .bar { background: rgba(5,7,15,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; }
body.sub .bar .link { color: #fff; }
body.sub .bar .link:hover { color: var(--accent); }
/* product screens keep their own light palette */
.fr, .pv, .photo, .ui { --bg: #F2F4FA; --surface: #E9ECF7; --ink: #0A0F1F; --muted: #566089; --field-1: #0A0F1F; --field-1-ink: #fff; --field-2: #E3E7F5; --field-2-ink: #0A0F1F; --tint: #C9CFE6; --navy: #141B36; }
body.sub .btn.dark { background: rgba(255,255,255,.14); color: #fff; }
body.sub .btn.dark:hover { background: rgba(255,255,255,.24); }
body.sub .chips span { background: rgba(255,255,255,.14); }
body.sub .tab[aria-selected="true"] { color: #0A0F1F; }
body.sub .opt { background: var(--field-2); }
body.sub .opt[aria-pressed="true"], body.sub .opt[aria-pressed="true"] span, body.sub .opt[aria-pressed="true"] .pr { color: #0A0F1F; }
body.sub .plan:nth-child(1) .go, body.sub .plan:nth-child(3) .go { color: #0A0F1F; }
body.sub .d-web { color: #0A0F1F; }
body.sub .d-sys { background: var(--uv); color: #fff; }
body.sub .how-svg rect[fill="#141B36"] { fill: #6B4EFF; }
body.sub .how-fig, body.sub .how-svg { background: var(--surface); }
body.sub .proj:hover { background: var(--field-2); }
body.sub footer { background: transparent; color: #fff; --field-1: #141B36; }
body.sub .mark b:nth-child(4), body.sub .mark b:nth-child(7) { color: #fff; }
body.sub footer .btn.dark { background: rgba(255,255,255,.14); }
body.sub .opt[aria-pressed="true"] { background: var(--accent); }

/* contrast fixes */
.fr, .pv, .photo { color: #0A0F1F; }
.chat .a { color: #0A0F1F; }
.tile.uv .chat .u { background: rgba(5,7,15,.38); }
.spine em { opacity: 1; }
body.home footer { --field-2: #E3E7F5; --tint: #C9CFE6; }
body.home .mark b:nth-child(3), body.home .mark b:nth-child(5) { color: #0A0F1F; }
.phone .scr, .phone .scr .card, .phone .scr .li { color: #0A0F1F; }

/* ---------- floating WhatsApp button ---------- */
.wa-fab { position: fixed; left: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; animation: wa-float 3.2s ease-in-out infinite; transition: transform .2s; }
.wa-fab svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.wa-fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25D366; z-index: -1; animation: wa-ring 2.4s ease-out infinite; }
.wa-fab:hover { transform: scale(1.08); }
.wa-fab.drag { cursor: grabbing; animation: none; transform: scale(1.12); }
.wa-fab.drag::before { animation: none; opacity: 0; }
@keyframes wa-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
.foot-b .btn { margin-inline-end: 84px; }
@media (max-width: 700px) { .wa-fab { width: 52px; height: 52px; left: 14px; bottom: 14px; } .foot-b .btn { margin-inline-end: 72px; } }
@media (prefers-reduced-motion: reduce) { .wa-fab, .wa-fab::before { animation: none; } }

/* phone performance and sizing */
html.fly, html.fly body { overscroll-behavior-y: none; }
@media (max-width: 1000px) {
  body.home .bar, body.sub .bar { background: rgba(5,7,15,.9); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 700px) {
  .wa-fab { width: 46px; height: 46px; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .wa-fab::before { animation-name: wa-ring-s; }
  .foot-b .btn { margin-inline-end: 66px; }
}
@keyframes wa-ring-s { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
