:root {
  --ink: #161412; --paper: #fff6ea;
  --c1: #ff8fc7; --c2: #ffd23f; --c3: #2b4bff; --c4: #3bd18f; --c5: #9b7bff; --c6: #ff5b2e;
  --pad: clamp(16px, 3vw, 40px);
  --sec: clamp(64px, 8vw, 120px);
  /* Theme tokens (light) */
  --bg: var(--paper); --fg: var(--ink); --line: var(--ink);
  --surface: var(--paper); --field: #fff;
  --deep: var(--ink); --foot: var(--ink);
  --c3-text: var(--c3);
  color-scheme: light;
}
/* Theme tokens (dark) */
:root[data-theme="dark"] {
  --bg: #14120f; --fg: var(--paper); --line: #f3e9dc;
  --surface: #1e1b18; --field: #27231f;
  --deep: #1e1b18; --foot: #0c0b09;
  --c3-text: #7d91ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); transition: background .3s, color .3s; font-family: "Archivo", "Alexandria", system-ui, sans-serif; text-wrap: pretty; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--c2); color: var(--ink); }
:focus-visible { outline: 3px solid var(--c3); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Buttons */
.pill { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; background: transparent; color: var(--fg); transition: background .2s, color .2s; }
.pill-big { padding: 15px 22px; font-size: 17px; gap: 28px; }
.pill-dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill-dark:hover { background: var(--c3); border-color: var(--c3); color: #fff; }
.pill-blue { background: var(--c3); border-color: var(--c3); color: #fff; }
.pill-blue:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.pill-outline:hover { background: var(--c2); color: var(--ink); border-color: var(--ink); }

/* Brand mark */
.mark { display: grid; grid-template-columns: repeat(2, 13px); grid-template-rows: repeat(2, 13px); }
.mark i:nth-child(1) { background: var(--c1); border-radius: 100% 0 0 0; }
.mark i:nth-child(2) { background: var(--c2); border-radius: 0 100% 0 0; }
.mark i:nth-child(3) { background: var(--c3); border-radius: 0 0 0 100%; }
.mark i:nth-child(4) { background: var(--c4); border-radius: 0 0 100% 0; }
.mark.big { grid-template-columns: repeat(2, 22px); grid-template-rows: repeat(2, 22px); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 14px var(--pad); background: var(--bg); border-bottom: 2px solid var(--line); transition: background .3s; }
.brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; font-weight: 900; font-stretch: 115%; font-size: 22px; letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-weight: 600; font-size: 15px; }
.nav-links > a:not(.pill):hover { text-decoration: underline; text-underline-offset: 4px; }
.menu-btn { display: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); font: inherit; font-weight: 700; cursor: pointer; color: var(--fg); }
.menu-btn[aria-expanded="true"] { background: var(--c2); color: var(--ink); border-color: var(--ink); }
.mobile-menu { position: fixed; inset: 74px 0 0 0; z-index: 29; background: var(--c2); color: var(--ink); padding: 24px var(--pad) 32px; display: flex; flex-direction: column; gap: 6px; overflow: auto; border-top: 2px solid var(--ink); }
.mobile-menu[hidden] { display: none; }
.mobile-menu > a:not(.pill) { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 2px solid var(--ink); font-weight: 900; font-stretch: 112%; font-size: clamp(34px, 9vw, 56px); letter-spacing: -0.04em; line-height: 1; }
.mobile-menu i { width: 22px; height: 22px; border: 2px solid var(--ink); }
.mobile-menu .pill { margin-top: 20px; }
.mobile-menu .pill-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 999px) { .nav-links { display: none; } .menu-btn { display: inline-flex; } }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: clamp(28px, 4vw, 56px); padding: clamp(28px, 4vw, 56px) var(--pad) clamp(28px, 3vw, 40px); }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 2px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c4); }
h1 { font-weight: 900; font-stretch: 112%; font-size: clamp(46px, 7.2vw, 124px); line-height: 1.04; letter-spacing: -0.045em; }
.hl { color: var(--ink); border-radius: 999px; padding: 0 0.2em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-foot { display: flex; flex-direction: column; gap: 22px; max-width: 48ch; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { display: flex; flex-direction: column; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--line); border-radius: 32px; overflow: hidden; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; transition: background .45s; }
.tile .rot { position: absolute; inset: 0; transition: transform .65s cubic-bezier(.3, 1.5, .5, 1); }
.tile .rot span { position: absolute; transition: background .45s; }
.tiles-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }

/* Marquee */
.marquee { overflow: hidden; background: var(--c6); color: var(--ink); border-block: 2px solid var(--ink); padding: 16px 0; font-weight: 900; font-stretch: 120%; font-size: clamp(24px, 3vw, 44px); letter-spacing: -0.03em; }
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { white-space: nowrap; }
.marquee-track i { width: 0.7em; height: 0.7em; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.marquee-track i:nth-of-type(even) { border-radius: 100% 0 0 0; }
@keyframes marquee { to { transform: translateX(calc(-50% - 18px)); } }

/* Sections */
.section { padding: var(--sec) var(--pad); }
.section-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px 56px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.split { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.section-head p { font-size: 18px; line-height: 1.55; max-width: 44ch; }
h2 { font-weight: 900; font-stretch: 112%; font-size: clamp(42px, 6.4vw, 104px); line-height: 0.95; letter-spacing: -0.045em; }
.dark-section { background: var(--deep); color: var(--paper); }
.rounded-top { border-radius: 40px 40px 0 0; }
.ruled { border-top: 2px solid rgba(255, 246, 234, .3); padding-top: clamp(48px, 6vw, 80px); }
#process { padding-top: 0; }

/* Shapes */
.s-quarter { border-radius: 100% 0 0 0; }
.s-circle { border-radius: 50%; }
.s-arch { border-radius: 50% 50% 0 0; }
.s-drop { border-radius: 0 50% 50% 50%; }
.s-half { border-radius: 50% 50% 0 0 / 100% 100% 0 0; height: 50% !important; top: auto !important; bottom: 0; }
.s-leaf { border-radius: 100% 0 100% 0; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.service { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 56px; min-height: 340px; padding: 26px; border-radius: 28px; border: 2px solid var(--line); color: var(--ink); }
.service.dark { color: var(--paper); }
.service .shape { position: absolute; inset-inline-end: -30px; top: -30px; width: 150px; height: 150px; background: rgba(255, 246, 234, .45); transition: transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.service:hover .shape { transform: rotate(90deg) scale(1.25); }
.service b, .service div { position: relative; }
.service b { font-size: 15px; }
.service div { display: flex; flex-direction: column; gap: 12px; }
.service h3 { font-weight: 900; font-stretch: 110%; font-size: clamp(30px, 2.6vw, 40px); line-height: 0.95; letter-spacing: -0.035em; }
.service p { font-size: 16px; line-height: 1.5; }

/* Work */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--paper); background: transparent; color: var(--paper); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.filter.active { background: var(--paper); color: var(--ink); }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 18px; }
.project { display: flex; flex-direction: column; gap: 16px; padding: 14px 14px 22px; border-radius: 30px; color: var(--ink); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.project:hover { transform: rotate(-1.2deg) translateY(-6px); }
.project.light-text { color: #fff; }
.project[hidden] { display: none; }
.media { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .35); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.project-info { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 0 8px; }
.project-info h3 { font-weight: 900; font-stretch: 110%; font-size: 30px; letter-spacing: -0.03em; line-height: 1; margin-bottom: 6px; }
.project-info p { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tags span { padding: 5px 11px; border-radius: 999px; border: 1.5px solid currentColor; font-size: 13px; font-weight: 700; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.step { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: 28px; color: var(--ink); min-height: 360px; }
.step-top { display: flex; justify-content: space-between; align-items: flex-start; }
.num { font-weight: 900; font-stretch: 120%; font-size: 64px; line-height: .8; letter-spacing: -0.05em; }
.shape-sm { position: relative; width: 64px; height: 64px; background: var(--ink); }
.step small { margin-top: auto; font-size: 14px; font-weight: 700; }
.step h3 { font-weight: 900; font-stretch: 110%; font-size: 34px; letter-spacing: -0.03em; line-height: 1; }
.step p { font-size: 16px; line-height: 1.5; }

/* Journal */
.posts { display: flex; flex-direction: column; border-top: 2px solid var(--line); }
.post { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 32px; align-items: center; padding: 26px 8px; border-bottom: 2px solid var(--line); transition: background .2s, padding .25s; }
.post:hover { background: var(--hover); color: var(--ink); padding-inline-start: 24px; }
.post h3 { font-weight: 800; font-stretch: 108%; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -0.03em; line-height: 1.05; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.tag { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); }
@media (max-width: 640px) { .post { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px clamp(32px, 5vw, 80px); background: var(--c2); color: var(--ink); border-top: 2px solid var(--ink); }
.contact-copy { display: flex; flex-direction: column; gap: 24px; }
.contact-copy h2 { font-size: clamp(46px, 7vw, 116px); line-height: 1.02; }
.contact-copy p { font-size: 18px; line-height: 1.55; max-width: 40ch; }
.email { align-self: flex-start; font-weight: 900; font-stretch: 110%; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.02em; border-bottom: 3px solid var(--ink); padding-bottom: 4px; word-break: break-all; }
.form-card { padding: clamp(20px, 2.6vw, 36px); border-radius: 32px; background: var(--surface); color: var(--fg); border: 2px solid var(--ink); transition: background .3s; }
form { display: flex; flex-direction: column; gap: 26px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
legend, .field { font-weight: 800; font-size: 16px; padding: 0; margin-bottom: 12px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options input { position: absolute; opacity: 0; width: 0; height: 0; }
.options span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s; }
.options input:checked + span { background: var(--on, var(--ink)); color: var(--ink); border-color: var(--ink); }
.options input:checked + span.dark-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.options input:focus-visible + span { outline: 3px solid var(--c3); outline-offset: 2px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.field input, .field textarea { font: inherit; font-weight: 500; font-size: 17px; padding: 14px 18px; border-radius: 18px; border: 2px solid var(--line); background: var(--field); color: var(--fg); width: 100%; }
.field textarea { resize: vertical; }
.submit { width: 100%; font-weight: 800; font-size: 19px; }
.thanks { display: flex; flex-direction: column; gap: 20px; }
.thanks[hidden] { display: none; }
.thanks h3 { font-weight: 900; font-stretch: 112%; font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.04em; line-height: .95; }
.thanks p { font-size: 17px; line-height: 1.5; }
.thanks .pill { align-self: flex-start; }
.thanks .pill:hover { background: var(--c4); color: var(--ink); border-color: var(--ink); }

/* Footer */
.footer { background: var(--foot); color: var(--paper); padding: clamp(48px, 6vw, 88px) var(--pad) 28px; overflow: hidden; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px; font-size: 16px; margin-bottom: clamp(48px, 7vw, 110px); }
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wordmark { display: flex; justify-content: space-between; font-weight: 900; font-stretch: 125%; font-size: clamp(64px, 19vw, 340px); line-height: .78; letter-spacing: -0.05em; }

@media (max-width: 520px) {
  .pill-big { width: 100%; }
  .tiles-foot { flex-direction: column; align-items: flex-start; }
  .project-info { flex-direction: column; align-items: flex-start; }
  .tags { justify-content: flex-start; }
  .service { min-height: 280px; }
  .step { min-height: 300px; }
}

/* Language & theme toggles */
.nav-tools, .menu-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-weight: 700; font-size: 15px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.tool-btn:hover { background: var(--c2); color: var(--ink); border-color: var(--ink); }
.theme-btn .ti { font-size: 18px; }
.menu-tools { display: none; flex-wrap: wrap; margin-top: 16px; }
.mobile-menu .tool-btn { border-color: var(--ink); color: var(--ink); min-height: 48px; padding: 10px 18px; font-size: 16px; }
.mobile-menu .tool-btn:hover { background: var(--paper); }
@media (max-width: 520px) { .nav-tools { display: none; } .menu-tools { display: flex; } }

/* Arabic / RTL — Arabic glyphs render in Alexandria, Latin stays Archivo */
[dir="rtl"] :not(.wordmark, .wordmark *, .brand) { letter-spacing: 0 !important; }
[dir="rtl"] h1 { font-size: clamp(42px, 6.4vw, 110px); line-height: 1.3; }
[dir="rtl"] h2 { line-height: 1.2; }
[dir="rtl"] .contact-copy h2 { line-height: 1.3; }
[dir="rtl"] :is(.service h3, .project-info h3, .step h3, .thanks h3) { line-height: 1.25; }
[dir="rtl"] .post h3 { line-height: 1.4; }
[dir="rtl"] .mobile-menu > a:not(.pill) { line-height: 1.3; }
[dir="rtl"] :is(.lead, .section-head p, .service p, .step p, .contact-copy p, .thanks p) { line-height: 1.75; }
[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(calc(50% + 18px)); } }
[dir="rtl"] .project:hover { transform: rotate(1.2deg) translateY(-6px); }

/* ===== inbeat logo: the i with the bouncing dot ===== */
.brand { font-size: 30px; font-stretch: 112%; }
.logo-word { display: inline-flex; align-items: baseline; direction: ltr; unicode-bidi: isolate; }
.logo-i { position: relative; display: inline-block; }
.logo-dot {
  position: absolute; left: 50%; top: -0.04em; width: 0.24em; height: 0.24em; margin-left: -0.13em;
  border-radius: 50%; background: var(--c3); transform-origin: 50% 100%;
  animation: dot-bounce .75s cubic-bezier(.45, 0, .55, 1) infinite, dot-color 6s steps(1) infinite;
}
@keyframes dot-bounce {
  0%, 100% { transform: translateY(0) scale(1.18, .82); }
  12% { transform: translateY(-0.06em) scale(.96, 1.04); }
  50% { transform: translateY(-0.34em) scale(1, 1); }
  88% { transform: translateY(-0.06em) scale(.96, 1.04); }
}
@keyframes dot-color {
  0% { background: var(--c3); } 16.6% { background: var(--c1); } 33.3% { background: var(--c2); }
  50% { background: var(--c4); } 66.6% { background: var(--c5); } 83.3% { background: var(--c6); }
}
.brand-big { font-size: 64px; align-self: flex-start; padding-top: 18px; }
.wm-i { position: relative; display: inline-block; }
.wordmark .logo-dot { top: 0.02em; }

/* ===== Work: real projects ===== */
.work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; }
.project { grid-column: span 12; padding: 16px 16px 26px; }
.project.half { grid-column: span 6; }
.project:hover { transform: translateY(-6px); }
[dir="rtl"] .project:hover { transform: translateY(-6px); }
.project-info { padding: 4px 14px 0; }
.project-info h3 { font-size: clamp(34px, 3.4vw, 54px); }
.project-info p { font-size: 18px; }
.tags span { font-size: 14px; padding: 6px 13px; }
/* phone frame */
.ph { position: relative; flex: 0 0 auto; border-radius: 34px; background: #121115; padding: 7px; box-shadow: 0 24px 50px rgba(0, 0, 0, .28), inset 0 0 0 2px #34333b; }
.ph img { width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 28px; display: block; }
/* fanned phones for apps */
.media.fan { aspect-ratio: auto; height: clamp(380px, 46vw, 640px); display: flex; align-items: flex-end; justify-content: center; padding: 0 2%; direction: ltr; overflow: hidden; }
.media.fan .ph { width: clamp(130px, 17vw, 250px); margin: 0 -1.4%; transform: translateY(14%); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.media.fan .ph:nth-child(1) { transform: translateY(26%) rotate(-8deg); }
.media.fan .ph:nth-child(2) { transform: translateY(18%) rotate(-4deg); z-index: 1; }
.media.fan .ph:nth-child(3) { width: clamp(150px, 19.5vw, 285px); transform: translateY(8%); z-index: 3; }
.media.fan .ph:nth-child(4) { transform: translateY(18%) rotate(4deg); z-index: 1; }
.media.fan .ph:nth-child(5) { transform: translateY(26%) rotate(8deg); }
.project:hover .media.fan .ph:nth-child(1) { transform: translateY(20%) rotate(-10deg); }
.project:hover .media.fan .ph:nth-child(2) { transform: translateY(12%) rotate(-5deg); }
.project:hover .media.fan .ph:nth-child(3) { transform: translateY(3%); }
.project:hover .media.fan .ph:nth-child(4) { transform: translateY(12%) rotate(5deg); }
.project:hover .media.fan .ph:nth-child(5) { transform: translateY(20%) rotate(10deg); }
/* website + phones */
.media.web { position: relative; display: block; aspect-ratio: auto; height: clamp(380px, 46vw, 640px); direction: ltr; overflow: hidden; }
.browser { position: absolute; left: 7%; top: 10%; width: 70%; border-radius: 18px; overflow: hidden; background: #f1f0f5; box-shadow: 0 30px 60px rgba(0, 0, 0, .22); border: 2px solid var(--ink); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #f1f0f5; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 12px; font-size: 12px; font-weight: 600; color: #6b6a72; }
.browser img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.media.web .ph { position: absolute; width: clamp(120px, 15vw, 220px); }
.media.web .ph-a { right: 15%; top: 26%; transform: rotate(-4deg); z-index: 2; }
.media.web .ph-b { right: 4%; top: 18%; transform: rotate(5deg); z-index: 3; }
.project:hover .browser { transform: translateY(-2%); }
.project:hover .media.web .ph-b { transform: rotate(8deg) translateY(-4%); }
/* brands */
.media.brandmedia { position: relative; display: block; aspect-ratio: 4 / 3; }
.media.brandmedia > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.project:hover .media.brandmedia > img { transform: scale(1.04); }
.media.brandmedia video { position: absolute; inset-inline-end: 5%; bottom: 6%; width: 24%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 18px 36px rgba(0, 0, 0, .35); }
.ar-name { font-family: "Alexandria", sans-serif; font-weight: 800; font-size: .6em; opacity: .8; letter-spacing: 0; }
.next-project { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); padding: clamp(24px, 3vw, 40px); background: var(--c2); color: var(--ink); flex-direction: row; flex-wrap: wrap; }
.next-project > div { flex: 1 1 260px; }
.next-project h3 { font-weight: 900; font-stretch: 110%; font-size: clamp(34px, 4vw, 60px); letter-spacing: -0.035em; line-height: 1; margin-bottom: 8px; }
.next-project p { font-size: 18px; }
.next-mark { font-weight: 900; font-stretch: 112%; font-size: clamp(80px, 8vw, 120px); line-height: 1; padding-top: .18em; }
.next-project .pill-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[dir="rtl"] .project-info h3, [dir="rtl"] .next-project h3 { line-height: 1.25; }
.brand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.brand-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.brand-grid img:hover { transform: rotate(-1.5deg) translateY(-4px); }
[dir="rtl"] .brand-grid img:hover { transform: rotate(1.5deg) translateY(-4px); }
@media (max-width: 700px) { .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .brand-grid img { border-radius: 18px; } }
.wa-btn { align-self: flex-start; }

@media (max-width: 900px) {
  .project.half { grid-column: span 12; }
  .media.fan .ph:nth-child(1), .media.fan .ph:nth-child(5) { display: none; }
  .media.fan .ph { width: 30%; margin: 0 -2%; }
  .media.fan .ph:nth-child(3) { width: 36%; }
  .media.fan, .media.web { height: clamp(320px, 88vw, 520px); }
  .browser { width: 82%; left: 4%; top: 6%; }
  .media.web .ph { width: 30%; }
  .media.web .ph-a { display: none; }
  .media.web .ph-b { right: 4%; top: 34%; }
}

/* ===== Fixes ===== */
h1 { font-size: clamp(44px, 6vw, 100px); }
[dir="rtl"] h1 { font-size: clamp(40px, 5.4vw, 92px); line-height: 1.32; }
/* service corner shapes face the right corner in Arabic */
[dir="rtl"] .service .shape { transform: scaleX(-1); }
[dir="rtl"] .service:hover .shape { transform: scaleX(-1) rotate(90deg) scale(1.25); }
[dir="rtl"] .shape-sm { transform: scaleX(-1); }
.copy { unicode-bidi: isolate; align-self: flex-start; }
.next-mark .logo-dot { animation: dot-bounce .75s cubic-bezier(.45, 0, .55, 1) infinite; background: var(--c3); }

/* ===== Round 3: Arabic spacing, logo tile, motion ===== */
/* Arabic headings: pills sized to the word so lines never touch */
[dir="rtl"] h1 { line-height: 1.55; }
[dir="rtl"] h2 { line-height: 1.35; }
[dir="rtl"] .contact-copy h2 { line-height: 1.5; }
[dir="rtl"] .hl { display: inline-block; line-height: 1.2; padding: 0.04em 0.28em 0.16em; margin-block: 0.06em; }
.hl { padding: 0 0.22em; }
h1 .hl { margin-inline: 0.02em; }

/* hero: the inbeat i lives in the shape grid */
.tile.logo-tile { background: var(--ink); cursor: default; display: grid; place-items: center; }
.tile.logo-tile .logo-word { font-weight: 900; font-stretch: 112%; font-size: clamp(46px, 6.2vw, 112px); line-height: 1; color: var(--paper); padding-top: .5em; }
:root[data-theme="dark"] .tile.logo-tile { background: var(--paper); }
:root[data-theme="dark"] .tile.logo-tile .logo-word { color: var(--ink); }

/* nav: current section */
.nav-links > a:not(.pill) { position: relative; padding: 6px 2px; }
.nav-links > a:not(.pill)::after { content: ''; position: absolute; inset-inline: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--c3); transform: scaleX(0); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.nav-links > a:not(.pill):hover { text-decoration: none; }
.nav-links > a:not(.pill):hover::after, .nav-links > a.is-current::after { transform: scaleX(1); }
.nav { transition: background .3s, box-shadow .3s; }
.nav.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); }

/* gentle reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* hero chips: soft pulse on the live dot */
.chip .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 209, 143, .6); } 50% { box-shadow: 0 0 0 6px rgba(59, 209, 143, 0); } }
.nw { white-space: nowrap; }

/* ===== Round 4: steps, reels, WhatsApp chat, floating button ===== */
.step h3 { margin-top: auto; }

/* Reels */
.reels-section { overflow: hidden; }
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 48px); align-items: start; }
.reel { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.reel:nth-child(2) { margin-top: clamp(0px, 5vw, 72px); }
.reel-phone { position: relative; width: min(100%, 300px); aspect-ratio: 9 / 16; border-radius: 34px; padding: 8px; background: var(--ink); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--rc); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .35s; }
.reel:nth-child(1) .reel-phone { transform: rotate(-3deg); }
.reel:nth-child(3) .reel-phone { transform: rotate(3deg); }
.reel:hover .reel-phone { transform: rotate(0) translateY(-6px); box-shadow: 14px 14px 0 var(--rc); }
.reel-phone video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: #000; cursor: pointer; }
.reel-sound { position: absolute; bottom: 20px; inset-inline-end: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .2s, background .2s; }
.reel-sound:hover { transform: scale(1.08); }
.reel-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reel-sound .spk { fill: currentColor; }
.reel-sound .on { display: none; }
.reel.sound .reel-sound { background: var(--rc); }
.reel.sound .reel-sound .on { display: block; }
.reel.sound .reel-sound .off { display: none; }
.reel figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.reel figcaption b { font-weight: 900; font-stretch: 110%; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.02em; }
.reel figcaption span { font-size: 15px; opacity: .75; }
@media (max-width: 760px) {
  .reels { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 18px; padding: 6px 4px 18px; margin-inline: calc(var(--pad, 20px) * -1); padding-inline: var(--pad, 20px); scrollbar-width: none; }
  .reels::-webkit-scrollbar { display: none; }
  .reel { flex: 0 0 66%; scroll-snap-align: center; }
  .reel:nth-child(2) { margin-top: 0; }
  .reel-phone { width: 100%; }
}

/* Contact: WhatsApp chat card */
.contact-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.contact-alt .pill-outline { border-color: var(--ink); color: var(--ink); }
.chat-card { align-self: start; display: flex; flex-direction: column; border-radius: 32px; overflow: hidden; background: #efe6da; border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--ink); color: var(--ink); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #0f5c4d; color: #fff; }
.chat-head b { display: block; font-size: 17px; font-weight: 800; }
.chat-head small { font-size: 13px; opacity: .8; }
.chat-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #4F2EF2; }
.chat-avatar .logo-word { font-size: 30px; font-weight: 900; line-height: 1; color: #fff; padding-top: .3em; }
.chat-avatar .logo-dot { background: #C8FF3D; }
.chat-head .wa-glyph { margin-inline-start: auto; width: 28px; height: 28px; fill: #fff; opacity: .9; }
.chat-body { display: flex; flex-direction: column; gap: 16px; padding: 22px 18px 18px; min-height: 300px; background-color: #efe6da; background-image: radial-gradient(rgba(22,20,18,.07) 1.2px, transparent 1.2px); background-size: 16px 16px; }
.bubble { position: relative; max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 16px; line-height: 1.5; box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.bubble.in { align-self: flex-start; background: #fff; border-start-start-radius: 4px; }
.bubble.out { align-self: flex-end; background: #d6f8c4; border-start-end-radius: 4px; font-weight: 600; }
.bubble.out::after { content: '✓✓'; display: inline-block; margin-inline-start: 8px; font-size: 12px; color: #2a9fd8; letter-spacing: -2px; }
.bubble.pop { animation: pop .35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { from { transform: scale(.92); opacity: .4; } to { transform: none; opacity: 1; } }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .2s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.pick:hover { transform: translateY(-2px); }
.pick[aria-pressed="true"] { background: var(--on); }
.pick[aria-pressed="true"]::before { content: '✓'; margin-inline-end: 6px; }
.pick[data-k="unsure"][aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chat-send { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 20px; background: #25d366; color: #0b2e1a; font-weight: 900; font-size: 18px; border-top: 2px solid var(--ink); transition: background .2s; }
.chat-send:hover { background: #1fbe5b; }
.chat-send svg { width: 22px; height: 22px; fill: currentColor; transition: transform .25s; }
.chat-send:hover svg { transform: translateX(4px); }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }
[dir="rtl"] .chat-send:hover svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .bubble { line-height: 1.7; }
@media (max-width: 520px) { .chat-card { box-shadow: 6px 6px 0 var(--ink); } .bubble { max-width: 92%; } }

/* Floating WhatsApp */
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: #25d366; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .3s, transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #25d366; animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.wa-float:hover { transform: translateY(-3px); }
