:root {
  --paper: #F3F0EA;
  --ink: #141312;
  --ink-2: #4A4640;
  --line: #DCD7CD;
  --red: #E5482B;
  --kufi: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --latin: "Anton", "Impact", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.75; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--latin); font-size: 26px; letter-spacing: 1px; text-decoration: none; display: inline-flex; align-items: flex-start; gap: 3px; direction: ltr; }
.logo span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-top: 4px; }
nav { display: flex; align-items: center; gap: 6px; }
nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
nav a:hover { background: #E7E2D8; }
nav .nav-cta { background: var(--ink); color: var(--paper); }
nav .nav-cta:hover { background: #000; }

/* hero */
.hero { padding: 56px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: #E7E2D8; padding: 6px 14px; border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #2F9E5B; box-shadow: 0 0 0 4px rgba(47,158,91,.18); }
h1 { font-family: var(--kufi); font-weight: 900; font-size: clamp(40px, 6.4vw, 84px); line-height: 1.25; margin: 0 0 24px; }
h1 em { font-style: normal; color: var(--red); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 560px; margin: 0 0 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; background: #FBFAF7; transition: border-color .2s, transform .2s; }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.dot { width: 10px; height: 10px; border-radius: 50%; }

.hero-fan { position: relative; height: 560px; }
.hero-fan .f { position: absolute; width: 230px; border-radius: 30px; border: 7px solid #141312; box-shadow: 0 30px 60px -20px rgba(20,19,18,.45); top: 50%; left: 50%; }
.f1 { transform: translate(-112%, -46%) rotate(-8deg); }
.f3 { transform: translate(12%, -46%) rotate(8deg); }
.f2 { transform: translate(-50%, -54%); z-index: 2; width: 250px !important; }

/* projects */
.proj { background: var(--bg); color: var(--fg); padding: 96px 0 88px; }
.proj-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.num { font-family: var(--latin); font-size: 20px; color: var(--ac); direction: ltr; text-align: right; margin-bottom: 8px; }
.num span { color: var(--muted); font-size: 15px; margin-left: 4px; }
.latin { font-family: var(--latin); font-size: 15px; letter-spacing: 3px; margin: 0; color: var(--muted); direction: ltr; text-align: right; }
.proj h2 { font-family: var(--kufi); font-weight: 900; font-size: clamp(38px, 5vw, 64px); line-height: 1.3; margin: 6px 0 6px; }
.meta { margin: 0 0 22px; font-weight: 600; color: var(--ac); }
.desc { margin: 0 0 26px; color: var(--fg); opacity: .88; max-width: 480px; }
.feats { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.feats li { font-size: 14px; padding: 6px 13px; border: 1px solid var(--ln); border-radius: 999px; color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.live { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 26px; border-radius: 999px; background: var(--ac); color: var(--bg); font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.live:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--ac); }
.host { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: right; }

.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.phone { padding: 0; border: 0; background: none; cursor: zoom-in; text-align: center; }
.phone img { width: 100%; border-radius: 26px; border: 6px solid #0E0D0C; box-shadow: 0 26px 50px -24px rgba(0,0,0,.55); transition: transform .3s; }
.phone:nth-child(2) { margin-top: 48px; }
.phone:nth-child(3) { margin-top: 96px; }
.phone:hover img { transform: translateY(-6px); }
.cap { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }
#trusty .phones { grid-template-columns: repeat(2, 1fr); max-width: 520px; margin-inline-start: auto; }

.browser { display: block; width: 100%; margin-top: 72px; padding: 0; border: 1px solid var(--ln); border-radius: 16px; overflow: hidden; background: #0E0D0C; cursor: zoom-in; box-shadow: 0 40px 80px -40px rgba(0,0,0,.5); }
.bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; background: #1D1B19; direction: ltr; }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: #3A3734; }
.bar b { font-weight: 400; font-size: 12px; color: #A49E95; margin: 0 auto; padding: 3px 18px; background: #2A2724; border-radius: 6px; }
.browser img { width: 100%; }

/* what you get */
.what { padding: 104px 0; }
.eyebrow.dark { background: var(--ink); color: var(--paper); }
.what h2, .cta h2 { font-family: var(--kufi); font-weight: 900; font-size: clamp(30px, 4vw, 50px); line-height: 1.35; margin: 0 0 48px; max-width: 760px; }
.what-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.w { background: #FBFAF7; padding: 30px 28px; }
.w b { font-family: var(--kufi); font-weight: 800; font-size: 19px; display: block; margin-bottom: 8px; }
.w p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* cta */
.cta { background: var(--ink); color: var(--paper); padding: 104px 0; }
.cta-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { margin: 0 0 18px; }
.cta p { color: #C9C3B8; font-size: 19px; max-width: 560px; margin: 0 0 34px; }
.cta-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 12px 28px; border-radius: 999px; border: 1px solid #4A4640; text-decoration: none; font-weight: 600; }
.cta-btn:hover { background: #24221F; }

.foot { background: var(--ink); color: #9A948A; border-top: 1px solid #2A2724; font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0; }

/* lightbox */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lb::backdrop { background: rgba(10,9,8,.88); backdrop-filter: blur(4px); }
.lb[open] { display: flex; align-items: center; justify-content: center; }
.lb[open] { flex-direction: column; gap: 16px; }
.lb img { max-height: 80vh; width: auto; max-width: min(440px, 92vw); border-radius: 24px; }
.lb img.wide { max-width: min(1280px, 94vw); border-radius: 12px; }
.lb-x { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #F3F0EA; color: #141312; cursor: pointer; display: grid; place-items: center; }

@media (max-width: 960px) {
  .hero { padding: 28px 0 64px; }
  .hero-grid, .proj-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-fan { height: 440px; }
  .hero-fan .f { width: 180px; }
  .f2 { width: 200px !important; }
  .proj { padding: 72px 0 64px; }
  .what-grid { grid-template-columns: 1fr 1fr; }
  #trusty .phones { margin-inline: 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  nav a:not(.nav-cta) { display: none; }
  .hero-fan { height: 360px; }
  .hero-fan .f { width: 148px; border-width: 5px; border-radius: 22px; }
  .f2 { width: 164px !important; }
  .phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin-inline: -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 64%; scroll-snap-align: center; margin-top: 0 !important; }
  #trusty .phones { max-width: none; }
  .browser { margin-top: 44px; border-radius: 12px; }
  .bar { height: 30px; }
  .what { padding: 72px 0; }
  .what-grid { grid-template-columns: 1fr; }
  .cta { padding: 80px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
