/* Measurements are taken from the reference shot, scaled to a 390px phone and a 1440px desktop. */
/* Same type system as the Sufra landing page: DM Sans text, Unbounded headlines,
   Thmanyah Sans for Arabic (the Latin fonts have no Arabic glyphs). */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/DM_Sans-variable-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/Unbounded-normal-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Thmanyah Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/thmanyahsans-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Thmanyah Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/thmanyahsans-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Thmanyah Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/thmanyahsans-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Thmanyah Sans";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/thmanyahsans-Black.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/InstrumentSerif-italic-latin.woff2") format("woff2");
}

/* Holds only the letters of the Arabic signature */
@font-face {
  font-family: "Aref Ruqaa";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ArefRuqaa-700-name.woff2") format("woff2");
}

:root {
  --font-text: "DM Sans", "Thmanyah Sans", sans-serif;
  --font-display: "Unbounded", "Thmanyah Sans", sans-serif;
  --surface: #eeecea;
  --surface-light: #f8f7f5;
  --ink: #161616;
  /* Decoration and hover: clearly lighter than the secondary text below */
  --ink-fade: #75726c;
  /* Secondary text: dark enough to read at small sizes */
  --ink-soft: #57544f;
  --btn: #252321;
  --line: #dddad4;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.6 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --u: calc(100cqw / 1440);
}

* { box-sizing: border-box; margin: 0; }

/* Links to a section, like "See my work", glide there instead of jumping */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }
.ink { fill: #2b2b2b; stroke: none; }

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

/* Paper grain over every surface */
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: var(--grain);
  opacity: .07;
}

/* ---------- Shared pieces ---------- */
.line {
  display: block;
  width: fit-content;
  margin-inline: auto;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--ink) 30%, var(--ink-fade) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 6vw, 2.25rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.035em;
  text-align: center;
}

.subtitle {
  font-size: clamp(1.1rem, 6vw, 2rem);
  font-weight: 500;
  line-height: 1.36;
  letter-spacing: -.01em;
  text-align: center;
}
.subtitle-wide { display: none; }

/* A dry brush stroke behind one word, revealed once in the reading direction */
:root { --brush: #dedad2; }
.brush-defs { position: absolute; width: 0; height: 0; }
.w-brush { position: relative; display: inline-block; isolation: isolate; padding-inline: .1em; color: var(--ink-fade); }
.w-brush svg { position: absolute; z-index: -1; top: -.26em; left: -.6em; width: calc(100% + 1.2em); height: calc(100% + .52em); overflow: visible; fill: var(--brush); filter: url(#brush-rough); }
[dir="rtl"] .w-brush svg { transform: scaleX(-1); }
.w-brush.is-waiting svg { clip-path: inset(-40% 105% -40% -5%); }
.w-brush.is-drawing svg { animation: brush-reveal 1000ms 250ms cubic-bezier(.3, .7, .2, 1) both; }
@keyframes brush-reveal { from { clip-path: inset(-40% 105% -40% -5%); } to { clip-path: inset(-40% -5% -40% -5%); } }

[dir="rtl"] .title {
  font-family: "Thmanyah Sans", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}
[dir="rtl"] .subtitle { font-weight: 700; letter-spacing: 0; }

.tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.btn-dark { background: var(--btn); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }

/* Hover lifts a pixel; press settles back slightly smaller */
.btn, .pill {
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.btn svg { transition: transform 160ms ease; }
.btn:active, .pill:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover {
    background: #383838;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 6px 16px rgba(0, 0, 0, .16);
    transform: translateY(-1px);
  }
  .btn-light:hover, .pill:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
  }
  .btn-shots:hover svg { transform: translate(2px, -2px); }
  .btn:active, .pill:active { transform: scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .pill, .btn svg { transition: background-color 160ms ease, box-shadow 160ms ease; }
  .btn:hover, .pill:hover, .btn:active, .pill:active, .btn-shots:hover svg { transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 14px 17px 75px;
  background: var(--surface);
  border-radius: 0 0 70px 70px;
}
/* The first section fills the screen, with its content centred below the top bar */
.hero .avatar { margin-top: auto; }
.hero .btn-shots { margin-bottom: auto; }

/* On phones the email and links collapse into icons */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  margin-bottom: 32px;
  color: #2c2c2c;
  font-size: .875rem;
}
.bar svg { width: 16px; height: 16px; flex-shrink: 0; }
.bar a:focus-visible, .bar button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bar-email {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.bar-email-text, .bar-email .icon-copy, .bar-email .icon-check, .bar-email.is-copied .icon-mail { display: none; }
.bar-email.is-copied .icon-check { display: block; }
.bar-right { display: flex; align-items: center; gap: 8px; }
.bar-links { display: none; }
.bar-icons { display: flex; gap: 2px; }
.bar-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background-color 160ms ease;
}
.bar-theme {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.icon-sun, [data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.pill-long { display: none; }
/* The narrowest phones need tighter buttons for the whole bar to fit */
@media (max-width: 359px) {
  .bar-right { gap: 2px; }
  .bar-email, .bar-icon, .bar-theme { width: 34px; }
}

@media (hover: hover) and (pointer: fine) {
  .bar-icon:hover, .bar-theme:hover { background: rgba(0, 0, 0, .06); }
}

/* The portrait stays grey like the project cards and gains its colour on hover */
.avatar { position: relative; width: 184px; height: 184px; margin-bottom: 72px; }
.avatar-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: #a9a9ab;
  filter: grayscale(1);
  transition: filter 260ms ease;
}
.avatar-photo { position: absolute; top: -7%; left: 50%; display: block; width: 115%; max-width: none; height: auto; transform: translateX(-50%); }
@media (hover: hover) and (pointer: fine) {
  .avatar-frame:hover { filter: none; }
}
.avatar-sign {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 2;
  color: var(--ink);
  white-space: nowrap;
  transform: translateX(-50%) rotate(-3deg);
}
.avatar-name { display: block; font-family: "Instrument Serif", "Times New Roman", serif; font-size: 1.75rem; font-style: italic; line-height: 1.25; }
.avatar-swash { display: block; width: 100%; height: 11px; fill: var(--ink-soft); transform: scaleX(-1); animation: avatar-swash 800ms 150ms cubic-bezier(.3, .7, .2, 1) both; }
@keyframes avatar-swash { from { clip-path: inset(-20% 0 -20% 100%); } to { clip-path: inset(-20% 0 -20% 0); } }
@media (prefers-reduced-motion: reduce) {
  .avatar-frame { transition: none; }
  .avatar-swash { animation: none; }
}

.hero .title { margin-top: 6px; }
.btn-shots { width: 167px; height: 56px; margin-top: 24px; }

/* ---------- Clients ---------- */
.clients {
  position: relative;
  z-index: 2;
  margin-top: -70px;
  padding: 146px 0 111px;
  background: var(--surface-light);
  border-radius: 0 0 70px 70px;
  font-size: 13px;
}
.logo {
  display: flex;
  align-items: center;
  color: #2b2b2b;
  line-height: 1;
  white-space: nowrap;
}
/* Quiet grey by default so logos follow the page, full colour on hover */
.logo { gap: .45em; font-size: 1.5em; font-weight: 600; letter-spacing: -.02em; opacity: .92; filter: grayscale(1); }
.logo-square { height: 1.9em; border-radius: .4em; }
.logo-full { height: 2.4em; }
.logo-on-dark { display: none; }
.logo-badge { height: 1.9em; border-radius: 50%; }
.logo-iug img { width: auto; height: 2.5em; }
.logo-iug-name { display: grid; gap: .2em; font-size: .9em; letter-spacing: 0; }
.logo-iug-name small { font-size: .5em; font-weight: 500; }

/* A short label beside the strip, stacked on small screens */
.clients-side { display: grid; align-items: center; justify-items: center; gap: 22px; }
.clients-side .marquee { width: 100%; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.clients-label { color: var(--ink-soft); font-size: 1.15em; font-weight: 500; white-space: nowrap; }
[dir="rtl"] .clients-label { font-family: "Fatimah", "Thmanyah Sans", sans-serif; font-size: 1.45em; }

/* The track holds two identical groups, so sliding it by half loops without a jump */
.marquee {
  --marquee-gap: 64px;
  --logo-room: 14px;
  margin-block: calc(var(--logo-room) * -1);
  padding-block: var(--logo-room);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--marquee-gap);
  padding-inline-end: var(--marquee-gap);
}
.logo { flex-shrink: 0; transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
  .logo:hover { transform: scale(1.08); opacity: 1; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; width: auto; }
  .marquee-group { flex: 1; flex-wrap: wrap; justify-content: center; padding-inline: 16px; }
  .marquee-group[aria-hidden], .logo[aria-hidden] { display: none; }
  .logo { transition: none; }
}

/* ---------- Services ---------- */
.services {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  padding: 56px clamp(17px, 7vw, 64px) 76px;
  background: var(--surface-light);
  border-radius: 70px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .9);
}
.services .divider-tag { background: var(--surface); }

.divider {
  position: relative;
  height: 1px;
  margin-top: 65px;
  background: var(--line);
}
.divider-tag {
  left: 50%;
  top: 0;
  width: 114px;
  height: 33px;
  font-size: .6875rem;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px clamp(16px, 5vw, 40px);
  margin-top: 77px;
}

.service-icon { display: flex; align-items: center; height: 36px; }
.service-icon svg, .cta-circle svg { height: auto; fill: none; stroke: #2b2b2b; stroke-width: 1.100; }
.service-icon svg { width: 39px; stroke-linecap: round; stroke-linejoin: round; }

.service h3 { margin-top: 21px; font-size: .9375rem; font-weight: 500; line-height: 20px; }
.service p { margin-top: 15px; color: var(--ink-soft); font-size: .75rem; line-height: 17px; text-wrap: pretty; }

/* Enough room for the two-line heading before the desktop layout starts */
@media (min-width: 600px) {
  .subtitle { font-size: 1.75rem; line-height: 1.5; }
  .subtitle-wide { display: block; }
  .subtitle-narrow { display: none; }
  .service p { font-size: .8125rem; line-height: 19px; }
}

/* ---------- Call to action ---------- */
.cta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 54px 17px 70px;
  background: var(--surface-light);
  border-radius: 70px 70px 0 0;
}
.cta-circle {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  background: var(--surface);
  border-radius: 50%;
}
.cta-circle svg { width: 62px; stroke-width: .65; stroke-linecap: round; stroke-linejoin: round; }
.cta-title { margin-top: 29px; }
.cta-actions { display: flex; gap: 15px; margin-top: 29px; }
.btn-email { width: 112px; height: 50px; gap: 9px; font-size: .6875rem; }
.btn-whatsapp { width: 114px; height: 50px; font-size: .6875rem; }

/* Tablets: the first section grows to suit the larger screen */
@media (min-width: 600px) and (max-width: 899px) {
  .hero .title { font-size: clamp(2.5rem, 6.5vw, 3.5rem); }
  .hero .btn-shots { width: 200px; height: 64px; margin-top: 28px; font-size: .9375rem; }
  .bar { font-size: 1rem; }
}

/* ---------- Desktop: every size is a fraction of the frame, so it scales as one piece ---------- */
@media (min-width: 900px) {
  .page { container-type: inline-size; }

  .title { font-size: calc(var(--u) * 42); line-height: calc(var(--u) * 54); }

  .subtitle { font-size: calc(var(--u) * 34); line-height: calc(var(--u) * 54); }
  .subtitle-wide { display: block; }
  .subtitle-narrow { display: none; }

  .tag { font-size: calc(var(--u) * 12); }
  .btn { font-size: calc(var(--u) * 12); }
  .btn svg { width: calc(var(--u) * 14); height: auto; }

  .hero {
    /* Shrinks with short screens too, so everything always fits in one screen */
    --u: min(calc(100cqw / 1440), calc(100svh / 880));
    padding: calc(var(--u) * 40) calc(100cqw / 1440 * 80) calc(var(--u) * 90);
    border-radius: 0 0 calc(var(--u) * 100) calc(var(--u) * 100);
    box-shadow: 0 2px 0 rgba(255, 255, 255, .9);
  }

  .bar { margin-bottom: 0; font-size: calc(var(--u) * 13); }
  .bar svg { width: calc(var(--u) * 15); height: calc(var(--u) * 15); }
  .bar-email { gap: calc(var(--u) * 8); width: auto; height: calc(var(--u) * 42); }
  .bar-email-text, .bar-email .icon-copy { display: block; }
  .bar-email .icon-mail, .bar-email.is-copied .icon-copy { display: none; }
  .bar-email .icon-copy { opacity: .55; transition: opacity 160ms ease; }
  .bar-right { gap: calc(var(--u) * 26); }
  .bar-links { display: flex; gap: calc(var(--u) * 26); }
  .bar-links a { position: relative; padding-block: calc(var(--u) * 6); }
  .bar-links a::after {
    content: "";
    position: absolute;
    inset: auto 0 calc(var(--u) * 2);
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
  }
  .bar-icons, .pill-short { display: none; }
  .bar-theme { width: calc(var(--u) * 42); height: calc(var(--u) * 42); }
  .pill {
    gap: calc(var(--u) * 8);
    height: calc(var(--u) * 42);
    padding-inline: calc(var(--u) * 20);
    font-size: calc(var(--u) * 13);
  }
  .pill-long { display: inline; }

  @media (hover: hover) and (pointer: fine) {
    .bar-email:hover .icon-copy { opacity: 1; }
    .bar-links a:hover::after { transform: scaleX(1); }
  }

  .avatar { width: calc(var(--u) * 236); height: calc(var(--u) * 236); margin-bottom: calc(var(--u) * 18); }
  .avatar-sign {
    top: auto;
    bottom: calc(var(--u) * 14);
    left: calc(100% + var(--u) * 10);
    transform: rotate(-5deg);
  }
  .avatar-name { font-size: calc(var(--u) * 36); }
  .avatar-swash { height: calc(var(--u) * 13); }

  .hero .title { margin-top: calc(var(--u) * 8); }
  .btn-shots {
    gap: calc(var(--u) * 12);
    width: calc(var(--u) * 180);
    height: calc(var(--u) * 60);
    margin-top: calc(var(--u) * 30);
  }

  .clients {
    margin-top: calc(var(--u) * -100);
    padding: calc(var(--u) * 214) 0 calc(var(--u) * 127);
    border-radius: 0 0 calc(var(--u) * 90) calc(var(--u) * 90);
    font-size: calc(var(--u) * 14);
  }
  .marquee { --marquee-gap: calc(var(--u) * 120); --logo-room: calc(var(--u) * 16); }
  .clients-side { grid-template-columns: auto minmax(0, 1fr); gap: calc(var(--u) * 40); padding-inline: calc(var(--u) * 120); }

  .services {
    margin-top: calc(var(--u) * 60);
    padding: calc(var(--u) * 90) calc(var(--u) * 236) calc(var(--u) * 120);
    border-radius: calc(var(--u) * 100);
  }

  .divider { margin-top: calc(var(--u) * 72); }
  .divider-tag { width: calc(var(--u) * 123); height: calc(var(--u) * 36); font-size: calc(var(--u) * 11); }

  .service-grid { gap: calc(var(--u) * 72) calc(var(--u) * 72); margin-top: calc(var(--u) * 72); }

  .service-icon { height: calc(var(--u) * 40); }
  .service-icon svg { width: calc(var(--u) * 46); }

  .service h3 { margin-top: calc(var(--u) * 24); font-size: calc(var(--u) * 19); line-height: calc(var(--u) * 26); }
  .service p { margin-top: calc(var(--u) * 14); font-size: calc(var(--u) * 15); line-height: calc(var(--u) * 23); }

  .cta {
    padding: calc(var(--u) * 80) calc(var(--u) * 32) calc(var(--u) * 110);
    border-radius: calc(var(--u) * 100) calc(var(--u) * 100) 0 0;
  }
  .cta-circle { width: calc(var(--u) * 130); height: calc(var(--u) * 130); }
  .cta-circle svg { width: calc(var(--u) * 68); }
  .cta-title { margin-top: calc(var(--u) * 36); }
  .cta-actions { gap: calc(var(--u) * 16); margin-top: calc(var(--u) * 36); }
  .btn-email, .btn-whatsapp { width: calc(var(--u) * 124); height: calc(var(--u) * 56); font-size: calc(var(--u) * 12); }
  .btn-email { gap: calc(var(--u) * 9); }
}

/* The hero appears once, complete. Its animations wait with it. */
.is-loading .hero > * { opacity: 0; }
html[lang="en"].is-loading .page { visibility: hidden; }
.is-loading .hero * { animation-play-state: paused !important; }
.is-entering .hero > * { animation: hero-in 320ms ease both; }
@keyframes hero-in { from { opacity: 0; } }

/* Selected text uses the site's greys instead of the browser's blue */
::selection { background: #5f5f5d; color: #fff; }

/* A thin thread for the scrollbar, on devices that show one */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    border: 3.5px solid transparent;
    border-radius: 9px;
    background: rgba(22, 22, 22, .3);
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover {
    border-width: 3px;
    background: rgba(22, 22, 22, .6);
    background-clip: padding-box;
  }
  @supports not selector(::-webkit-scrollbar) {
    html { scrollbar-width: thin; scrollbar-color: rgba(22, 22, 22, .3) transparent; }
  }
}
