/* Home page stylesheet (design "Pattern Chapters"). Loaded only on /, every rule is scoped under .home so the navbar, footer and other pages keep rethink.css as is. */

/* At Hauss Arabic subset: Latin and digits only. Janna (declared in rethink.css) covers the Arabic blocks, so Latin and digits fall through to this face. */
@font-face { font-family: "AtHauss"; font-weight: 200; font-style: normal; font-display: swap; src: url(/fonts/AtHaussArabic-Thin.sub.woff) format("woff"); }
@font-face { font-family: "AtHauss"; font-weight: 300; font-style: normal; font-display: swap; src: url(/fonts/AtHaussArabic-Light.sub.woff) format("woff"); }
@font-face { font-family: "AtHauss"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/AtHaussArabic-Regular.sub.woff) format("woff"); }
@font-face { font-family: "AtHauss"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/AtHaussArabic-Medium.sub.woff) format("woff"); }
@font-face { font-family: "AtHauss"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/AtHaussArabic-Semibold.sub.woff) format("woff"); }

.home{
  --ink:#0C002B; --midnight:#350A5E; --dusk:#552B81; --lumen:#7019BD; --mist:#F1EDF5; --paper:#FFFFFF; --ember:#E35336; --secondary:#806F9B; --halo:#614BF9;
  --edge-tl: radial-gradient(115% 90% at 6% -4%, #2E0B52 0%, #1B0538 40%, #0C002B 78%);
  --edge-tr: radial-gradient(115% 90% at 94% -4%, #2E0B52 0%, #1B0538 40%, #0C002B 78%);
  --ease: cubic-bezier(.16,1,.3,1);
  --t-1:12px;--t0:17px;--t1:24px;--t2:34px;--t3:48px;--t4:68px;--t5:96px;--t6:136px;
  --s0:8px;--s1:11px;--s2:16px;--s3:23px;--s4:32px;--s5:45px;--s6:64px;--s7:91px;--s8:128px;
  --r:6px; --rc:12px;
  --nav-h:72px;
  font-family:"Janna","AtHauss",sans-serif;background:var(--paper);color:var(--ink);line-height:1.8;font-weight:300;
  overflow-x:hidden;overflow-x:clip;
}
.home *{box-sizing:border-box;}
.home img{max-width:100%;display:block;}
.home a{color:inherit;text-decoration:none;}
.home bdi{unicode-bidi:isolate;}
.home :focus-visible{outline:2px solid var(--halo);outline-offset:3px;}
.home button{font:inherit;color:inherit;background:none;border:none;cursor:pointer;}
.home h1,.home h2,.home h3,.home p{margin:0;}

.home .container{max-width:1480px;margin-inline:auto;padding-inline:var(--s5);}
@media (max-width:1279px){.home .container{padding-inline:var(--s3);}}
@media (max-width:833px){.home .container{padding-inline:var(--s3);}}

.home .gd{background:var(--bg-grad,var(--edge-tr));color:var(--mist);}
.home .gl{background:var(--paper);color:var(--ink);}
.home .gm{background:var(--mist);color:var(--ink);}
.home .sec{padding-block:var(--s7);position:relative;overflow:hidden;}
@media (max-width:833px){.home .sec{padding-block:var(--s5);}}

/* type */
.home .eyebrow{font-size:var(--t-1);font-weight:500;color:var(--ember);line-height:1.6;}
.home .title{font-weight:300;letter-spacing:-0.02em;line-height:1.25;}
.home .title .lead{display:block;color:var(--lumen);font-weight:600;line-height:1.25;text-shadow:none;}
.home .title .trail{display:block;font-weight:200;line-height:1.25;margin-top:var(--s1);}
.home .title .one-line{display:block;line-height:1.25;}
.home .title--xl{font-size:var(--t5);font-weight:300;}
.home .title--sm{font-size:var(--t4);font-weight:300;line-height:1.25;}
.home .title--chapter{font-size:var(--t4);}
.home .title--name{font-size:var(--t3);}
@media (max-width:1279px){.home .title--xl{font-size:var(--t4);} .home .title--sm{font-size:var(--t4);}}
@media (max-width:833px){.home .title--xl{font-size:var(--t4);} .home .title--sm{font-size:var(--t3);} .home .title--chapter{font-size:var(--t3);} .home .title--name{font-size:var(--t2);}}
@media (max-width:430px){.home .title--xl{font-size:56px;}}

.home .body-txt{font-size:var(--t0);font-weight:300;line-height:1.8;max-width:52ch;}
.home .body-txt + .body-txt{margin-top:var(--s2);}
.home .sub{font-size:var(--t0);font-weight:300;line-height:1.8;max-width:52ch;margin-top:var(--s3);color:inherit;}
.home .facts{font-size:var(--t-1);color:var(--secondary);margin-top:var(--s3);}
.home .head-cluster .eyebrow{margin-bottom:var(--s1);}
.home .head-cluster .title{margin-bottom:0;}

/* buttons */
.home .actions{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center;margin-top:var(--s4);}
.home .btn{display:inline-flex;align-items:center;justify-content:center;gap:0;height:46px;min-height:46px;padding:0 var(--s3);border:1px solid transparent;border-radius:var(--r);font-size:var(--t-1);font-weight:500;line-height:1.2;transition:background-color .18s,border-color .18s,color .18s;white-space:nowrap;}
.home .btn-primary{background:var(--lumen);color:var(--mist);}
.home .btn-primary:hover{background:var(--midnight);}
.home .btn-secondary{background:transparent;border:1px solid var(--secondary);color:inherit;}
.home .gd .btn-secondary:hover{border-color:var(--mist);color:var(--mist);}
.home .gl .btn-secondary:hover,.home .gm .btn-secondary:hover{border-color:var(--ink);color:var(--ink);}
.home .note{font-size:var(--t-1);font-weight:300;color:var(--secondary);margin-top:var(--s2);}

/* motion */
@keyframes rkEnterL{from{opacity:0;transform:translateX(-14vw);}to{opacity:1;transform:translateX(0);}}
@keyframes rkEnterR{from{opacity:0;transform:translateX(14vw);}to{opacity:1;transform:translateX(0);}}
@keyframes rkEnterT{from{opacity:0;transform:translateY(-12vh);}to{opacity:1;transform:translateY(0);}}
@keyframes rkEnterB{from{opacity:0;transform:translateY(12vh);}to{opacity:1;transform:translateY(0);}}
@keyframes rkEnterTR{from{opacity:0;transform:translate(10vw,-10vh);}to{opacity:1;transform:translate(0,0);}}
@keyframes rkFadeUp{from{opacity:0;transform:translateY(18px);}to{opacity:1;transform:translateY(0);}}
@keyframes rkEdgeDrift{0%,100%{transform:translate(0,0);}50%{transform:translate(-2.4%,1.6%);}}
@keyframes rkScrollUp{from{transform:translateY(0);}to{transform:translateY(-50%);}}
@keyframes rkPulse{0%{box-shadow:0 0 0 0 rgba(227,83,54,.55);}70%{box-shadow:0 0 0 16px rgba(227,83,54,0);}100%{box-shadow:0 0 0 0 rgba(227,83,54,0);}}

.home [data-enter]{opacity:0;transform:translateY(28px);transition:opacity 900ms var(--ease),transform 900ms var(--ease);}
.home [data-enter].is-in{opacity:1;transform:none;}

.force-still .home, .force-still .home *, .force-still .home *::before, .force-still .home *::after{
  animation-duration:.001ms !important; animation-delay:0s !important; animation-iteration-count:1 !important;
  transition-duration:.001ms !important; scroll-behavior:auto !important;
}
@media (prefers-reduced-motion: reduce){
  .home,.home *,.home *::before,.home *::after{animation-duration:.001ms !important;animation-delay:0s !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;scroll-behavior:auto !important;}
}

/* pattern pieces */
.home .pc{position:absolute;pointer-events:none;}
.home .pc svg{width:100%;height:auto;display:block;}
.home .pc path,.home .pc rect{fill:var(--lumen);}
.home .pc.stroke path{fill:none;stroke:var(--lumen);stroke-width:7;}

/* marks */
.home .mark-wordmark{width:100%;height:auto;display:block;}
.home .mark-wordmark path{fill:var(--paper);}
.home .mark-glow{filter:drop-shadow(0 0 19px rgba(97,75,249,.73)) drop-shadow(0 0 13px rgba(97,75,249,1));}
.home .mark-monogram path{fill:var(--dusk);}

/* edge ambient light */
.home .sec.gd{isolation:isolate;}
.home .sec.gd::after{content:"";position:absolute;inset:-10%;background:inherit;z-index:-1;animation:rkEdgeDrift 26s var(--ease) infinite;opacity:.55;filter:blur(2px);}

/* hero. The site navbar (72px, sticky) sits above it, so the first screen is 100vh minus the navbar. */
.home .hero{position:relative;min-height:calc(100vh - var(--nav-h));min-height:calc(100svh - var(--nav-h));overflow:hidden;display:flex;align-items:stretch;padding:0;}
.home .hero::before{content:none;}
.home .hero-mark{position:absolute;top:var(--s4);inset-inline-start:var(--s4);z-index:6;width:92px;}
.home .hero-device{position:absolute;inset:0;inset-inline-start:33%;overflow:hidden;z-index:1;}
.home .hero-copy{position:relative;z-index:5;width:33%;min-height:calc(100vh - var(--nav-h));min-height:calc(100svh - var(--nav-h));display:flex;flex-direction:column;justify-content:center;padding:var(--s7) var(--s5);animation:rkFadeUp 900ms var(--ease) both;animation-delay:.55s;}
.home .hero-copy .eyebrow{margin-bottom:var(--s2);}
.home .hero-copy .title{margin-bottom:var(--s3);}
.home .hero .pc--p2{top:-7%;inset-inline-end:-7%;width:32%;z-index:4;animation:rkEnterTR 1100ms var(--ease) both;animation-delay:.05s;}
.home .hero .pc--p4{top:14%;inset-inline-end:4%;width:17%;z-index:3;animation:rkEnterR 1150ms var(--ease) both;animation-delay:.2s;}
.home .hero .pc--p5{bottom:-11%;inset-inline-end:20%;width:44%;z-index:2;animation:rkEnterB 1250ms var(--ease) both;animation-delay:.32s;}
.home .hero .pc--p3{top:28%;inset-inline-end:48%;width:15%;z-index:3;animation:rkEnterT 1100ms var(--ease) both;animation-delay:.44s;}
.home .hero .pc--p1{bottom:-5%;inset-inline-start:6%;width:23%;z-index:1;animation:rkEnterL 1150ms var(--ease) both;animation-delay:.56s;}

@media (max-width:1279px){
  .home .hero-device{inset-inline-start:30%;}
  .home .hero-copy{width:38%;padding:var(--s6) var(--s4);}
}
/* phones keep the desktop idea: the words on one side, the pattern standing on the other */
@media (max-width:833px){
  .home .hero{min-height:calc(100svh - var(--nav-h));flex-direction:row;padding:0;}
  .home .hero-device{position:absolute;inset:0;inset-inline-start:60%;width:auto;height:auto;max-height:none;margin:0;}
  .home .hero-copy{position:relative;width:62%;min-height:calc(100svh - var(--nav-h));padding:var(--s4) var(--s3);padding-inline-end:var(--s1);justify-content:center;align-items:flex-start;}
  .home .hero .title--xl{font-size:44px;}
  .home .hero-copy .title{margin-bottom:var(--s2);}
  .home .hero .title .lead,.home .hero .title .trail{width:min-content;}
  .home .hero .body-txt{font-size:var(--t0);}
  .home .hero .actions .btn{padding-inline:var(--s2);}
  .home .hero .pc--p2{top:-3%;inset-inline-end:-34%;width:118%;}
  .home .hero .pc--p4{top:22%;inset-inline-end:-6%;width:40%;}
  .home .hero .pc--p5{bottom:-10%;inset-inline-end:-46%;width:128%;}
  .home .hero .pc--p3{top:40%;inset-inline-start:8%;width:30%;}
  .home .hero .pc--p1{bottom:-3%;inset-inline-start:-4%;width:62%;}
}

/* English: the same page, mirrored. The Edge light moves to the left, Latin eyebrows track. */
html[dir="ltr"] .home{
  --edge-tl: radial-gradient(115% 90% at 94% -4%, #2E0B52 0%, #1B0538 40%, #0C002B 78%);
  --edge-tr: radial-gradient(115% 90% at 6% -4%, #2E0B52 0%, #1B0538 40%, #0C002B 78%);
}
html[dir="ltr"] .home .eyebrow{text-transform:uppercase;letter-spacing:.18em;}
html[dir="ltr"] .home .title,html[dir="ltr"] .home .title .lead,html[dir="ltr"] .home .title .trail,html[dir="ltr"] .home .title .one-line{line-height:1.05;}
html[dir="ltr"] .home .body-txt{line-height:1.6;}
@keyframes rkEnterTL{from{opacity:0;transform:translate(-10vw,-10vh);}to{opacity:1;transform:translate(0,0);}}
html[dir="ltr"] .home .hero .pc--p2{animation-name:rkEnterTL;}
html[dir="ltr"] .home .hero .pc--p4{animation-name:rkEnterL;}
html[dir="ltr"] .home .hero .pc--p1{animation-name:rkEnterR;}

/* phone component (rethink.css has its own .phone for the old screenshot strip, reset it here) */
.home .phone{position:relative;display:block;gap:0;scroll-snap-align:none;border-radius:45px;background:var(--ink);padding:9px;box-shadow:0 24px 60px rgba(12,0,43,.28);overflow:hidden;}
.home .phone-win{border-radius:36px;overflow:hidden;aspect-ratio:402/874;position:relative;}
.home .phone-win img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}

/* app chapters */
.home .chapters{padding-block:var(--s7);}
.home .chapters-head{max-width:620px;margin-bottom:var(--s7);}
.home .chapter{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:var(--s6);align-items:center;padding-block:var(--s7);border-top:1px solid rgba(85,43,129,.14);overflow:hidden;}
.home .chapter:first-of-type{border-top:none;}
.home .chapter-copy{position:relative;z-index:2;}
.home .chapter-copy .facts{max-width:46ch;}
.home .chapter-visual{position:relative;min-height:420px;display:flex;align-items:center;justify-content:center;}
.home .chapter-pattern{position:absolute;z-index:0;opacity:.9;pointer-events:none;}
.home .chapter-pattern svg{width:100%;height:auto;display:block;}
.home .chapter-pattern path,.home .chapter-pattern rect{fill:var(--lumen);}
.home .chapter-pattern.stroke path{fill:none;stroke:var(--lumen);stroke-width:7;}
.home .chapter-num{position:absolute;z-index:1;font-size:var(--t6);font-weight:600;color:var(--lumen);opacity:.16;line-height:1;pointer-events:none;user-select:none;}
.home .chapter-phone{position:relative;z-index:2;width:240px;}
/* The real app screens are full bleed, so a mild crop that hides the status bar replaces the reference's deeper zoom (which cut the screen titles). */
.home .chapter-phone .phone-win img{transform:scale(1.06) translateY(-3%);}
.home .chapter--01 .chapter-pattern{width:150%;inset-inline-end:-38%;top:-22%;}
.home .chapter--01 .chapter-num{top:-6%;inset-inline-end:2%;}
.home .chapter--02{grid-template-columns:1fr 1fr;}
.home .chapter--02 .chapter-copy{order:2;}
.home .chapter--02 .chapter-visual{order:1;}
.home .chapter--02 .chapter-pattern{width:140%;inset-inline-start:-34%;bottom:-20%;}
.home .chapter--02 .chapter-num{bottom:-4%;inset-inline-start:0;}
.home .chapter--03 .chapter-pattern{width:120%;inset-inline-end:-18%;top:-14%;}
.home .chapter--03 .chapter-num{top:-4%;inset-inline-end:4%;}
.home .chapter--04{grid-template-columns:1fr 1fr;}
.home .chapter--04 .chapter-copy{order:2;}
.home .chapter--04 .chapter-visual{order:1;}
.home .chapter--04 .chapter-pattern{width:130%;inset-inline-start:-30%;bottom:-24%;}
.home .chapter--04 .chapter-num{bottom:-2%;inset-inline-start:2%;}
.home .old-site-note{font-size:var(--t-1);color:var(--secondary);margin-top:var(--s7);max-width:48ch;}
.home .app-about{margin-top:var(--s4);max-width:60ch;}
.home .app-about a{text-decoration:underline;text-underline-offset:3px;}

@media (max-width:1279px){
  .home .chapter-num{font-size:var(--t5);}
}
@media (max-width:833px){
  .home .chapter{grid-template-columns:1fr;gap:var(--s4);padding-block:var(--s5);}
  .home .chapter--02 .chapter-copy,.home .chapter--04 .chapter-copy{order:2;}
  .home .chapter--02 .chapter-visual,.home .chapter--04 .chapter-visual{order:1;}
  .home .chapter-visual{min-height:280px;}
  .home .chapter-phone{width:180px;}
  .home .chapter-num{font-size:var(--t3);}
  .home .chapter--01 .chapter-pattern,.home .chapter--02 .chapter-pattern,.home .chapter--03 .chapter-pattern,.home .chapter--04 .chapter-pattern{width:170%;}
}

/* messages + phone band */
.home .wall{position:relative;}
.home .wall-anchor{top:-8%;inset-inline-end:-6%;width:46%;opacity:.55;z-index:0;}
.home .wall .head-cluster{max-width:560px;}
.home .wall .container{position:relative;z-index:1;}
.home .wall-grid{display:grid;grid-template-columns:1fr 300px;gap:var(--s7);align-items:center;margin-top:var(--s6);}
.home .chat-wrap{position:relative;height:620px;overflow:hidden;mask-image:linear-gradient(to bottom,transparent 0%,#000 12%,#000 88%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 12%,#000 88%,transparent 100%);}
.home .chat-track{display:flex;flex-direction:column;gap:var(--s3);width:230px;margin-inline:auto;animation:rkScrollUp 46s linear infinite;}
.home .chat-track img{width:100%;height:auto;border-radius:var(--r);border-start-start-radius:var(--rc);box-shadow:0 14px 30px -16px rgba(0,0,0,.6);}
.home .app-frame{position:relative;border-radius:var(--rc) var(--r) var(--r) var(--r);background:rgba(241,237,245,.06);border:1px solid rgba(241,237,245,.16);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);padding:var(--s3);}
.home .app-frame .phone{max-width:220px;margin-inline:auto;}
.home .app-frame-cap{display:flex;align-items:center;justify-content:space-between;padding:var(--s2) var(--s1) 0;}
.home .app-frame-cap .name{font-size:var(--t-1);font-weight:500;color:var(--mist);}
.home .app-frame-cap .dot{width:8px;height:8px;border-radius:50%;background:var(--ember);animation:rkPulse 2.6s var(--ease) infinite;}
@media (max-width:833px){
  .home .wall-grid{grid-template-columns:1fr;gap:var(--s5);}
  .home .chat-wrap{height:380px;}
  .home .chat-track{width:72%;}
  .home .app-frame .phone{max-width:180px;}
}

/* experience + video */
.home .exp .container{display:grid;grid-template-columns:1.1fr .9fr;gap:var(--s6);align-items:center;}
.home .video-box{position:relative;border-radius:var(--r);border-start-start-radius:var(--rc);overflow:hidden;aspect-ratio:16/9;background:var(--ink);}
.home .video-box img,.home .video-box iframe{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;border:none;}
.home .video-play{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;background:var(--lumen);display:flex;align-items:center;justify-content:center;transition:background-color .18s;}
.home .video-play:hover{background:var(--midnight);}
.home .video-play svg{width:20px;height:22px;display:block;margin-inline-start:3px;}
.home .exp-copy .eyebrow{margin-bottom:var(--s1);}
.home .quote-banner{position:relative;overflow:hidden;border-radius:var(--r);padding:var(--s5) var(--s5);background:var(--edge-tl);color:var(--mist);max-width:520px;margin-top:var(--s3);}
.home .quote-banner p{margin:0;font-size:var(--t2);font-weight:600;line-height:1.4;color:var(--mist);}
.home .quote-attr{display:flex;align-items:center;gap:var(--s2);margin-top:var(--s4);}
.home .quote-attr .name{font-size:var(--t0);font-weight:500;color:var(--mist);}
@media (max-width:833px){
  .home .exp .container{grid-template-columns:1fr;gap:var(--s4);}
  .home .quote-banner{padding:var(--s4);max-width:none;}
  .home .quote-banner p{font-size:var(--t1);}
}

/* closing */
.home .closing{text-align:start;}
.home .closing-device{position:absolute;inset:0;z-index:0;opacity:.55;}
.home .closing-device .pc{position:absolute;}
.home .closing .pc--p2{top:-10%;inset-inline-end:-6%;width:16%;}
.home .closing .pc--p4{top:40%;inset-inline-end:4%;width:9%;}
.home .closing .pc--p5{bottom:-16%;inset-inline-end:16%;width:22%;}
.home .closing .pc--p3{top:8%;inset-inline-start:30%;width:8%;}
.home .closing .pc--p1{bottom:-10%;inset-inline-start:4%;width:12%;}
.home .closing .container{position:relative;z-index:1;}

/* phones: the pattern stays inside the visual and never runs behind the copy */
@media (max-width:833px){.home .chapter{overflow:visible;}.home .chapter-visual{overflow:hidden;}}
/* phones: the chapter number sits fully inside its visual, in the corner the pattern leaves empty, big enough to read */
@media (max-width:833px){
  .home .chapter-num{font-size:var(--t4);opacity:.22;}
  .home .chapter--01 .chapter-num,.home .chapter--03 .chapter-num{top:0;bottom:auto;inset-inline-end:0;inset-inline-start:auto;}
  .home .chapter--02 .chapter-num,.home .chapter--04 .chapter-num{bottom:0;top:auto;inset-inline-start:0;inset-inline-end:auto;}
  .home .chapter--03 .chapter-num{color:var(--mist);opacity:.4;}
}
.home .note bdi{white-space:nowrap;}
@media (max-width:833px){html[dir="ltr"] .home .title--chapter{font-size:40px;} html[dir="ltr"] .home .title--sm{font-size:40px;}}

/* Small and short screens (EL Houssine, 2026-11-04: a small laptop cut the hero headline).
   The hero headline follows the window's width and height, so it always fits the first screen. */
@media (min-width:834px){
  .home .hero .title--xl{font-size:clamp(44px,min(5.4vw,10vh),96px);}
  .home .hero-copy{padding-block:clamp(32px,8vh,91px);}
}
/* The chapter pattern stays inside its visual at every width, so it never runs behind the copy. */
.home .chapter{overflow:visible;}
.home .chapter-visual{overflow:hidden;}
/* Chapter 03: Samah's rectangle as an outline, like the hero's, not a solid box behind the phone. */
.home .chapter--03 .chapter-pattern rect{fill:none;stroke:var(--lumen);stroke-width:7;}
.home .chapter--03 .chapter-pattern{width:78%;inset-inline-end:4%;top:6%;}
/* The chapter numbers sit in the corner the pattern leaves empty, above the pattern, readable. */
.home .chapter-num{opacity:1;color:#DCCAEE;z-index:1;}
@media (min-width:834px){.home .chapter-num{font-size:clamp(40px,5.5vw,68px);}}
.home .chapter--01 .chapter-num{top:0;bottom:auto;inset-inline-start:0;inset-inline-end:auto;}
.home .chapter--02 .chapter-num,.home .chapter--04 .chapter-num{top:0;bottom:auto;inset-inline-end:0;inset-inline-start:auto;}
.home .chapter--03 .chapter-num{top:auto;bottom:0;inset-inline-start:0;inset-inline-end:auto;color:#DCCAEE;opacity:1;}
@media (max-width:833px){
  .home .chapter--03 .chapter-pattern{width:70%;inset-inline-end:6%;top:6%;}
  .home .chapter-num{opacity:1;font-size:var(--t3);}
  .home .chapter--01 .chapter-num{inset-inline-start:auto;inset-inline-end:0;}
  .home .chapter--03 .chapter-num{top:0;bottom:auto;}
}
