:root {
  --bg: #f3f4ec;
  --ink: #1e2a20;
  --muted: #596451;
  --line: #d5dbcc;
  --rule: #8a9880;
  --accent: #668646;
  --hover: #597d38;
  --lime: #8eb54f;
  --focus: #71984a;
  --mint: #c1de91;
  --deep: #1e2c23;
  --deep-ink: #f1f4e8;
  --deep-muted: #c0ceb6;
  --deep-line: #4c5946;
  --closing: #e0eaca;
  --card: #e6eadf;
  --card-hover: #dfe8cf;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-gap: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font: var(--sans);
  --h1-ls: -0.065em;
  --h-ls: -0.05em;
  --eb-ls: 2px;
  --h1-lh: 1.02;
  --origin: left;
  --header-h: 96px;
}

html[lang="ar"] {
  --font: "IBM Plex Sans Arabic", var(--sans);
  --h1-ls: 0;
  --h-ls: 0;
  --eb-ls: 0;
  --h1-lh: 1.3;
  --origin: right;
}

html {
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 7px;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Intro overlay: pure CSS, so it plays even before the script loads. */

.intro {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep);
  color: var(--deep-ink);
  font-family: var(--sans);
  animation: intro-out 1.1s cubic-bezier(0.76, 0, 0.24, 1) 1.25s forwards;
}

.intro-mark {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: clamp(56px, 9vw, 110px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.intro-logo {
  width: 1.05em;
  height: 0.9em;
  overflow: visible;
  fill: none;
  stroke: var(--mint);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-logo path {
  stroke-dasharray: 1;
  animation: draw 0.9s var(--ease) both;
}

.intro-logo path:nth-child(2) {
  animation-delay: 0.21s;
}
.intro-logo path:nth-child(3) {
  animation-delay: 0.32s;
}
.intro-logo path:nth-child(4) {
  animation-delay: 0.43s;
}
.intro-logo path:nth-child(1) {
  animation-delay: 0.1s;
}

.intro-word {
  display: flex;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.intro-word span {
  display: inline-block;
  animation: rise 0.9s var(--ease) 0.3s both;
}

.intro-word span:nth-child(2) {
  animation-delay: 0.36s;
}
.intro-word span:nth-child(3) {
  animation-delay: 0.42s;
}
.intro-word span:nth-child(4) {
  animation-delay: 0.48s;
}
.intro-word span:nth-child(5) {
  animation-delay: 0.54s;
}

@keyframes intro-out {
  from {
    clip-path: inset(0 0 0 0);
  }
  to {
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

/* Custom cursor, scroll progress and header */

html.loomi-cursor,
html.loomi-cursor * {
  cursor: none !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  border-radius: 50%;
  pointer-events: none;
}

.cursor-dot {
  z-index: 200;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--bg);
  mix-blend-mode: difference;
}

.cursor-ring {
  z-index: 199;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 1px solid var(--lime);
  transition:
    width 0.45s var(--ease),
    height 0.45s var(--ease),
    margin 0.45s var(--ease),
    background 0.45s ease,
    border-color 0.45s ease;
}

.cursor-ring.big {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: rgba(142, 181, 79, 0.18);
}

.loomi-cursor .cursor-dot.on,
.loomi-cursor .cursor-ring.on {
  display: block;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: var(--origin);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 244, 236, 0.82);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid rgba(213, 219, 204, 0);
  transition: border-color 0.5s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  margin: 0 5vw;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -2px;
}

.logo {
  width: 40px;
  height: 36px;
  overflow: visible;
  fill: none;
  stroke: var(--lime);
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  font-size: 13px;
}

.nav-link {
  padding: 14px 0;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-touch {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.6s var(--ease);
}

.nav-touch:hover {
  border-bottom-color: var(--hover);
  color: var(--hover);
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang button {
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.6s var(--ease);
}

.lang button[lang="ar"] {
  padding: 5px 11px;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 13px;
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  z-index: -1;
  top: 50%;
  inset-inline-start: 38%;
  width: min(88vw, 1220px);
  aspect-ratio: 1;
  transform: translateY(-50%);
}

.hero-art-wrap {
  width: 100%;
  height: 100%;
  will-change: transform;
}

.globe {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-text {
  position: relative;
  margin-inline: 9vw 6vw;
  padding: 60px 0 130px;
  pointer-events: none;
  will-change: transform, opacity;
}

.eyebrow {
  margin: 0 0 30px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--eb-ls);
}

.hero-title {
  margin: 0 0 32px;
  font-size: clamp(60px, 8.2vw, 132px);
  font-weight: 400;
  letter-spacing: var(--h1-ls);
  line-height: var(--h1-lh);
}

html[lang="ar"] .hero-title {
  font-size: clamp(46px, 5.8vw, 96px);
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero-title .accent {
  padding-bottom: 0.08em;
  color: var(--accent);
}

.chars {
  display: flex;
  flex-wrap: wrap;
}

.word {
  display: inline-flex;
  white-space: pre;
}

[data-char] {
  display: inline-block;
  white-space: pre;
}

.hero-desc {
  max-width: 420px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  pointer-events: auto;
  transition:
    gap 0.5s var(--ease-gap),
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.6s var(--ease);
}

.cta:hover {
  gap: 36px;
  border-bottom-color: var(--hover);
  color: var(--hover);
}

.cta-arr,
.closing-email span {
  font-size: 16px;
  line-height: 1;
}

/* The idea: a tall section whose sticky panel lights words as you scroll. */

.idea {
  position: relative;
}

.motion .idea {
  height: 320vh;
}

.idea-sticky {
  display: flex;
  align-items: center;
}

.motion .idea-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.idea-inner {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 0 5vw;
  padding: 96px 4vw 60px;
}

.idea-rule {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  transform-origin: var(--origin);
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(40px, 6vw, 90px);
  padding-top: 56px;
}

.idea-title {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 400;
  letter-spacing: var(--h-ls);
  line-height: 1.08;
}

.idea-title span {
  display: block;
}

.idea-title .accent {
  color: var(--accent);
}

.idea-bar {
  position: relative;
  width: 180px;
  height: 1px;
  margin-top: 40px;
  overflow: hidden;
  background: var(--line);
}

.idea-bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: var(--origin);
}

.idea-paras {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 600px;
}

.idea-paras p {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.5;
}

[data-word] {
  transition: color 0.25s linear;
}

.motion [data-word] {
  color: #c3cab8;
}

.motion [data-word].lit {
  color: var(--ink);
}

/* Shared section heading */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-title {
  margin: 0;
  font-size: clamp(38px, 4.6vw, 66px);
  font-weight: 400;
  letter-spacing: var(--h-ls);
  line-height: 1.12;
}

.section-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  min-height: 44px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  transition:
    gap 0.5s var(--ease-gap),
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.6s var(--ease);
}

.link-arrow:hover {
  gap: 56px;
  border-bottom-color: var(--hover);
  color: var(--hover);
}

/* The potential */

.potential {
  background: var(--deep);
  color: var(--deep-ink);
}

.potential-inner {
  padding: clamp(80px, 10vw, 140px) 9vw;
}

.potential .eyebrow {
  color: var(--deep-muted);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(36px, 5vw, 70px);
  margin-top: clamp(42px, 5vw, 72px);
}

.workflow {
  position: relative;
  padding-top: 24px;
}

.workflow-rule {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--deep-line);
  transform-origin: var(--origin);
}

.workflow h3 {
  margin: 0 0 14px;
  color: var(--mint);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: var(--h-ls);
  line-height: 1.25;
}

.workflow p {
  max-width: 440px;
  margin: 0;
  color: var(--deep-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* The founders */

.founders {
  padding: clamp(80px, 10vw, 140px) 9vw;
}

.founders .section-sub {
  max-width: 300px;
  color: var(--muted);
}

.founder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(24px, 4vw, 55px);
  margin-top: 64px;
}

.founder {
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.founder-country {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: var(--eb-ls);
}

.portrait {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--card);
  transition:
    background 0.6s ease,
    transform 0.7s var(--ease);
}

.portrait:hover {
  background: var(--card-hover);
}

.portrait-crop {
  display: grid;
  width: 78%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  mix-blend-mode: multiply;
  transition: transform 1.1s var(--ease);
}

/* Each source has different headroom. Keep faces on a common eye line. */
.portrait-crop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--portrait-x, 0%), var(--portrait-y))
    scale(var(--portrait-scale));
  filter: grayscale(100%) contrast(1.04);
  transition: filter 0.8s ease;
}

.portrait-crop img[src="assets/saif.png"] {
  --portrait-y: 4%;
  --portrait-scale: 1.13;
}

.portrait-crop img[src="assets/munthir.png"] {
  --portrait-x: 2%;
  --portrait-y: -4.5%;
  --portrait-scale: 1.16;
}

.portrait-crop img[src="assets/robert.png"] {
  --portrait-x: 1%;
  --portrait-y: 23%;
  --portrait-scale: 1.52;
}

.portrait:hover .portrait-crop {
  transform: scale(1.04);
}

.portrait:hover img {
  filter: grayscale(0%) contrast(1);
}

.founder h3 {
  margin: 26px 0 6px;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 400;
  letter-spacing: var(--h-ls);
  line-height: 1.15;
}

.founder-role {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.founder-prev-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--eb-ls);
}

.founder-prev {
  display: flex;
  flex-direction: column;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.founder-prev li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.4;
}

.founder-prev .note {
  color: var(--muted);
  font-size: 12px;
  text-align: end;
}

.founder .link-arrow {
  align-self: flex-start;
  margin-top: auto;
}

/* Closing */

.closing {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--closing);
}

.closing-art {
  position: absolute;
  z-index: -1;
  top: 50%;
  inset-inline-end: -60px;
  width: min(760px, 90vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.closing-art-host {
  width: 100%;
  height: 100%;
}

.closing-art-host svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.closing-inner {
  padding: clamp(90px, 11vw, 150px) 9vw;
}

.closing-title {
  max-inline-size: 12ch;
  margin: 0 0 44px;
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 400;
  letter-spacing: var(--h1-ls);
  line-height: 1.1;
  text-wrap: balance;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.closing-email {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 22px);
  transition:
    gap 0.5s var(--ease-gap),
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.6s var(--ease);
}

.closing-email:hover {
  gap: 36px;
  border-bottom-color: var(--hover);
  color: var(--hover);
}

.copy {
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition:
    color 0.3s ease,
    transform 0.6s var(--ease);
}

.copy:hover {
  color: var(--ink);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 85px;
  margin: 0 5vw;
  color: var(--muted);
  font-size: 12px;
}

.site-footer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}

/* Phones: drop the section links, stack the globe under the headline. */

@media (max-width: 760px) {
  :root {
    --header-h: 72px;
  }

  .brand {
    gap: 8px;
    font-size: 30px;
    letter-spacing: -1.5px;
  }

  .logo {
    width: 32px;
    height: 29px;
  }

  .nav {
    gap: 16px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-text {
    margin-inline: 6vw;
    padding: 48px 0 0;
  }

  .hero-title,
  html[lang="ar"] .hero-title {
    font-size: clamp(44px, 12.5vw, 64px);
  }

  .hero-art {
    position: relative;
    order: 2;
    top: auto;
    inset-inline-start: auto;
    width: 170vw;
    margin: -14vw 0 -8vw -35vw;
    transform: none;
  }

  html[dir="rtl"] .hero-art {
    margin-inline: -35vw 0;
  }

  .motion .idea {
    height: 220vh;
  }

  .idea-inner {
    margin: 0 6vw;
    padding: calc(var(--header-h) + 8px) 0 32px;
  }

  .idea-rule {
    top: calc(var(--header-h) + 8px);
  }

  .idea-grid {
    padding-top: 40px;
  }

  .potential-inner,
  .founders,
  .closing-inner {
    padding-inline: 6vw;
  }

  .portrait {
    align-self: center;
    width: min(100%, 280px);
  }

  .closing-art {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro {
    display: none;
  }
}
