/* NimKits — kit-frame identity.
   Plastic greys + slate ink; every kit brings its own colour (--kit). Decal yellow only for status and focus. */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap;
  src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-weight: 700; font-display: swap; src: url('fonts/ibm-plex-sans-arabic-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #ECEFF3;      /* page: pale kit plastic */
  --plastic: #D6DCE4;    /* sprue body */
  --runner: #B4BFCC;     /* sprue runners and gates */
  --white: #FBFCFD;
  --ink: #1C2433;        /* slate ink */
  --ink-2: #4E5A6C;
  --decal: #F2B705;      /* status + focus only */
  --kit: #7C5CFF; --kit-deep: #3A2A9E; --kit-soft: #ECE8FF;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --text: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--text); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--decal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; font-weight: 700; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--text); letter-spacing: 0; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 66ch; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */
.top, .foot-row { max-width: var(--wrap); margin: 0 auto; padding: 22px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; color: var(--ink); }
.brand.small { font-size: 1.05rem; }
.brand.small .mark { width: 24px; height: 24px; }
nav { display: flex; gap: clamp(14px, 2.4vw, 30px); align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--ink-2); }
nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.lang { color: var(--ink); padding: 5px 12px; border: 2px solid var(--runner); border-radius: 999px; }
.lang:hover { border-color: var(--ink); text-decoration: none !important; }
.foot { margin-top: 96px; border-top: 2px solid var(--plastic); }
.disclaimer { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 40px; font-size: 0.86rem; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; font: 600 1rem/1 var(--text); text-decoration: none; color: var(--ink); background: var(--white);
  border: 2px solid var(--runner); cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2B3547; }

/* ---------- hero with the kit frame ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(28px, 6vw, 72px) var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.4rem); line-height: 0.96; letter-spacing: -0.045em; font-variation-settings: 'wdth' 90; margin-bottom: 24px; }
[dir="rtl"] .hero h1 { line-height: 1.2; font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.lede { font-size: 1.16rem; color: var(--ink-2); margin-bottom: 30px; }

.sprue { margin: 0; }
.sprue svg { width: 100%; height: auto; overflow: visible; }
.runner-outer { fill: none; stroke: var(--runner); stroke-width: 13; }
.runner line { stroke: var(--runner); stroke-width: 8; stroke-linecap: round; }
.gate { fill: var(--runner); transition: opacity .2s ease; }
.empty { fill: var(--plastic); stroke: var(--runner); stroke-width: 2; }
.tag rect { fill: var(--runner); }
.tag text { fill: var(--paper); font: 700 14px var(--display); letter-spacing: -0.01em; }
.part { cursor: pointer; }
.part .body { fill: var(--kit); }
.part .glyph { fill: #fff; }
.part .snap { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.part:hover .snap, .part:focus-visible .snap { transform: translate(8px, -12px) rotate(-5deg); }
.part:hover .gate, .part:focus-visible .gate { opacity: 0; }
.part:focus-visible { outline: none; }
.part:focus-visible .body { stroke: var(--decal); stroke-width: 5; }
/* the one orchestrated moment: parts press out of the mould on load */
.part, .slot { animation: press .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes press { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.part, .slot { transform-box: fill-box; transform-origin: center; }

/* ---------- kits ---------- */
.kits, .how, .inbox, .p-section, .doc { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.kits { padding-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head p { margin: 0; color: var(--ink-2); }
.kit { display: grid; grid-template-columns: 88px minmax(0, 1fr) minmax(0, 300px) auto; gap: 28px; align-items: center;
  padding: 28px; margin-bottom: 16px; background: var(--kit-soft); border-radius: 24px;
  border-inline-start: 12px solid var(--kit); }
.kit-icon { border-radius: 22px; }
.kit h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; margin-bottom: 4px; }
.kit h3 a { text-decoration: none; }
.kit h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--kit); }
.kit-kind { font-weight: 600; color: var(--kit-deep); margin: 0 0 4px; font-size: 0.95rem; }
.kit-kind a { text-decoration: none; }
.kit-tag { margin: 0 0 10px; font-size: 1.08rem; }
.kit-btn { background: var(--kit-deep); color: #fff; border-color: var(--kit-deep); white-space: nowrap; }
.kit-btn:hover { background: var(--ink); border-color: var(--ink); }
.status { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--ink-2); margin: 0; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--decal); box-shadow: 0 0 0 3px rgba(242,183,5,.25); flex: none; }
.status-live .dot { background: #1FA971; box-shadow: 0 0 0 3px rgba(31,169,113,.22); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; }
.facts div { border-top: 2px solid color-mix(in srgb, var(--kit) 30%, transparent); padding-top: 6px; }
.facts dt { font-size: 0.82rem; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; font-size: 0.98rem; }
.kit.next { grid-template-columns: 88px minmax(0, 1fr); background: transparent; border: 2px dashed var(--runner); border-inline-start-width: 2px; }
.kit.next h3 { font-size: 1.35rem; margin-bottom: 6px; }
.kit.next p { margin: 0; color: var(--ink-2); }
.next-slot { width: 88px; height: 88px; border-radius: 22px; background: var(--plastic); box-shadow: inset 0 0 0 2px var(--runner); }

/* ---------- principles ---------- */
.how { padding-top: 96px; }
.how > h2 { margin-bottom: 30px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.how-item { border-top: 4px solid var(--ink); padding-top: 18px; }
.how-item h3 { font-size: 1.35rem; margin-bottom: 10px; }
.how-item p { color: var(--ink-2); margin: 0; }

/* ---------- inbox ---------- */
.inbox { margin-top: 96px; }
.inbox { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  background: var(--ink); color: #E9EDF3; border-radius: 28px; padding: clamp(28px, 5vw, 52px); max-width: calc(var(--wrap) - 2 * var(--gutter)); }
.inbox h2 { color: #fff; margin-bottom: 8px; }
.inbox p { margin: 0; color: #B9C3D1; }
.inbox-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.inbox .btn.primary { background: var(--decal); border-color: var(--decal); color: var(--ink); }
.inbox .btn.primary:hover { background: #FFCB2E; }
.inbox .btn:not(.primary) { background: transparent; color: #fff; border-color: #5B6779; }
.inbox .btn:not(.primary):hover { border-color: #fff; }

/* ---------- product page ---------- */
.p-hero { max-width: calc(var(--wrap) - 2 * var(--gutter) + 0px); margin: 12px auto 0; background: var(--kit-deep); color: #fff; border-radius: 32px;
  padding: clamp(28px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 1200px) { .p-hero { margin-inline: var(--gutter); } }
.p-hero h1 { color: #fff; font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 0.98; letter-spacing: -0.045em; margin-bottom: 10px; }
.p-hero .kit-kind { color: color-mix(in srgb, var(--kit-soft) 80%, #fff); margin-top: 18px; }
.p-icon { border-radius: 20px; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.p-tagline { font: 600 1.35rem/1.35 var(--display); color: #fff; margin-bottom: 14px; }
[dir="rtl"] .p-tagline { font-family: var(--text); }
.p-hero .lede { color: color-mix(in srgb, var(--kit-soft) 85%, #fff); }
.p-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.btn.on-kit { background: #fff; color: var(--kit-deep); border-color: #fff; }
.btn.on-kit:hover { background: var(--kit-soft); border-color: var(--kit-soft); }
.btn.ghost-on-kit { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.ghost-on-kit:hover { border-color: #fff; }
.status.on-dark { color: color-mix(in srgb, var(--kit-soft) 85%, #fff); }
.p-shot { width: min(100%, 400px); justify-self: center; border-radius: 26px; box-shadow: 0 30px 70px rgba(10, 6, 40, .45); }
.p-section { padding-top: 88px; }
.p-section > h2 { margin-bottom: 26px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 36px; }
.features li { border-top: 3px solid var(--kit); padding-top: 14px; }
.features h3 { margin-bottom: 6px; }
.features p { color: var(--ink-2); margin: 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 62%); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { border-radius: 16px; border: 2px solid var(--plastic); }
.gallery figcaption { font-size: 0.95rem; color: var(--ink-2); margin-top: 10px; }
.install { }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; max-width: 760px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: baseline; font-size: 1.05rem; }
.steps li::before { content: counter(s); font: 700 1.6rem/1 var(--display); color: var(--kit); }
.install .btn.on-kit { background: var(--kit-deep); color: #fff; border-color: var(--kit-deep); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.split h2 { margin-bottom: 18px; }
.langs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.langs li { padding: 6px 14px; border-radius: 999px; background: var(--white); border: 2px solid var(--plastic); font-weight: 500; }
.text-link { color: var(--kit-deep); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.faq { max-width: 820px; border-top: 2px solid var(--plastic); }
.faq details { border-bottom: 2px solid var(--plastic); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 600 1.12rem/1.4 var(--text); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 1.6rem/1 var(--display); color: var(--kit); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }
.meta-line { color: var(--ink-2); font-size: 0.95rem; margin-top: 22px; }

/* ---------- documents (privacy, support) ---------- */
.doc { max-width: 820px; padding-top: 40px; }
.doc h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.04em; margin-bottom: 12px; }
[dir="rtl"] .doc h1 { line-height: 1.25; }
.doc h2 { font-size: 1.4rem; margin: 36px 0 10px; letter-spacing: -0.015em; }
.doc .btn { margin-top: 4px; }
.doc-list { padding-inline-start: 20px; }
.doc-list li { margin-bottom: 8px; }
.doc-list .sep { color: var(--runner); margin: 0 6px; }
.note { padding: 14px 18px; border-radius: 14px; background: var(--white); border: 2px dashed var(--runner); }
.nf-wrap { display: grid; gap: 48px; }
.nf h1 { margin-bottom: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero, .p-hero { grid-template-columns: 1fr; }
  .kit { grid-template-columns: 72px minmax(0, 1fr); }
  .kit-icon, .next-slot { width: 72px; height: 72px; }
  .kit .facts, .kit-btn { grid-column: 1 / -1; }
  .kit-btn { justify-self: start; }
  .features { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  nav { gap: 12px; }
  .kit { padding: 22px; gap: 18px; border-inline-start-width: 8px; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-auto-columns: 86%; }
  .inbox { margin-inline: var(--gutter); }
  .foot-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .part, .slot { animation: none; }
  .part .snap, .btn, .faq summary::after { transition: none; }
}
