/* xoshly.app home: a short motion story, "from bio link to booking". */
body.home-page { background: #00243A; }

.home {
  position: relative;
  isolation: isolate;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FBF8EE;
  color: #10283A;
  font-family: 'Readex Pro', 'Noto Kufi Arabic', system-ui, sans-serif;
}
.home[lang="ar"], .home[lang="ku"], .home [lang="ar"], .home [lang="ku"] { font-family: 'Noto Kufi Arabic', 'Readex Pro', system-ui, sans-serif; }

.home-decor { position: absolute; z-index: -1; pointer-events: none; border-radius: 999px; }
.home-decor.a { top: -90px; right: -80px; width: 240px; height: 240px; background: #B7CCDA; opacity: .7; animation: rjBob 8s ease-in-out infinite; }
.home-decor.b { bottom: 170px; left: -60px; width: 140px; height: 140px; background: #FDD9A8; opacity: .8; animation: rjBob 9s ease-in-out infinite -3s; }

.home-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-family: 'Readex Pro', system-ui, sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; display: block; }

/* ---- stage + scenes */
.story { position: relative; flex: 1; min-height: 330px; }
@media (min-height: 780px) { .story { zoom: 1.12; } }
.sc { position: absolute; inset: 6px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.sc.on { animation: scIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.sc.off { animation: scOut .4s ease both; }
@keyframes scIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes scOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-28px); } }
/* child animations keep running while a scene fades out, so its end state stays put */
.sc:is(.on, .off) .pop { animation: hPop .45s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes hPop { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* scene 1: Instagram-like bio card */
.ig {
  position: relative;
  width: min(300px, 100%);
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: #0C0F14;
  color: #F5F5F5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 28px 40px -22px rgba(12, 15, 20, .7);
}
.sc:is(.on, .off) .ig { animation: hUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.ig-head { display: flex; align-items: center; gap: 14px; }
.ig-av { flex: none; width: 66px; height: 66px; padding: 3px; border-radius: 999px; background: conic-gradient(from 200deg, #FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5, #FEDA75); }
.ig-av span { width: 100%; height: 100%; border-radius: 999px; border: 3px solid #0C0F14; background: #FBF6F4; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ig-name { display: flex; flex-direction: column; gap: 3px; }
.ig-name b { font-size: 16px; font-weight: 700; }
.ig-name span { font-size: 13px; color: #A8A8A8; }
.ig-lines { display: flex; flex-direction: column; gap: 7px; margin: 16px 0 12px; }
.ig-lines i { display: block; height: 9px; border-radius: 5px; background: #2A2F37; }
.ig-link { position: relative; display: inline-flex; align-items: center; gap: 7px; padding-block: 6px; padding-inline: 8px 10px; margin-inline-start: -8px; border-radius: 9px; color: #8FA6F5; font-size: 15px; }
.ig-link svg { width: 17px; height: 17px; flex: none; }
.sc:is(.on, .off) .ig-link { animation: igGlow 1.6s ease-in-out .6s 1 both, linkPress .35s ease 2.05s both; }
@keyframes igGlow {
  0% { background: rgba(143, 166, 245, 0); box-shadow: 0 0 0 0 rgba(143, 166, 245, .5); }
  60% { background: rgba(143, 166, 245, .22); box-shadow: 0 0 0 10px rgba(143, 166, 245, 0); }
  100% { background: rgba(143, 166, 245, .18); box-shadow: 0 0 0 0 rgba(143, 166, 245, 0); }
}
@keyframes linkPress { 0%, 100% { transform: none; } 50% { transform: scale(.94); background: rgba(143, 166, 245, .35); } }
.ig-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ig-btns span { height: 32px; border-radius: 9px; background: #262A31; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ig-btns span:first-child { background: #4A5DF9; }
.tap {
  position: absolute;
  inset-inline-start: 86px;
  top: 150px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  opacity: 0;
}
.sc:is(.on, .off) .tap { animation: tapMove 1.5s cubic-bezier(.3, .7, .2, 1) 1.05s both; }
@keyframes tapMove {
  0% { opacity: 0; transform: translate(60px, 90px); }
  45% { opacity: 1; transform: none; }
  62% { opacity: 1; transform: scale(.75); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.7); }
}

/* scene 2: booking */
.bk { width: min(300px, 100%); padding: 16px; border-radius: 16px; background: #FFFFFF; box-shadow: 0 24px 36px -22px rgba(18, 48, 42, .45); }
.sc:is(.on, .off) .bk { animation: hUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.bk-title { font-size: 17px; font-weight: 500; margin-bottom: 12px; }
.bk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-tile { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; }
.bk-tile b { font-size: 14px; font-weight: 700; }
.bk-tile small { font-size: 12px; color: #24413A; }
.bk-tile:nth-child(1) { animation-delay: .15s !important; }
.bk-tile:nth-child(2) { animation-delay: .25s !important; }
.bk-tile:nth-child(3) { animation-delay: .35s !important; }
.bk-tile:nth-child(4) { animation-delay: .45s !important; }
.sc:is(.on, .off) .bk-tile.pick { animation: hPop .45s cubic-bezier(.2, .9, .3, 1.25) .15s both, tileSel .4s ease 1.1s both !important; }
@keyframes tileSel { 0% { box-shadow: 0 0 0 0 #003049; } 50% { transform: scale(.95); } 100% { box-shadow: 0 0 0 3px #003049; transform: none; } }
.bk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.bk-slots span { height: 40px; border-radius: 12px; background: #FFFFFF; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px #E9E2C9; }
.bk-slots span:nth-child(1) { animation-delay: 1.5s !important; }
.bk-slots span:nth-child(2) { animation-delay: 1.6s !important; }
.bk-slots span:nth-child(3) { animation-delay: 1.7s !important; }
.sc:is(.on, .off) .bk-slots .pick { animation: hPop .45s cubic-bezier(.2, .9, .3, 1.25) 1.7s both, slotSel .35s ease 2.4s both !important; }
@keyframes slotSel { 0% { transform: scale(.9); } 100% { background: #003049; color: #FFFFFF; box-shadow: none; transform: none; } }

/* scene 3: WhatsApp confirmation */
.wa { width: min(300px, 100%); border-radius: 18px; overflow: hidden; background: #EFE7DE; box-shadow: 0 24px 36px -22px rgba(18, 48, 42, .45); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.sc:is(.on, .off) .wa { animation: hUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #075E54; color: #FFFFFF; }
.wa-av { width: 34px; height: 34px; border-radius: 999px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.wa-av svg { width: 24px; height: 24px; display: block; }
.wa-head b { display: block; font-size: 15px; }
.wa-head small { font-size: 12px; opacity: .8; }
.wa-body { padding: 16px 14px 18px; min-height: 120px; }
.wa-msg { position: relative; max-width: 88%; padding: 9px 11px 20px; border-radius: 10px; border-start-start-radius: 0; background: #FFFFFF; font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); transform-origin: top left; }
[dir="rtl"] .wa-msg { transform-origin: top right; }
.sc:is(.on, .off) .wa-msg { animation: hPop .45s cubic-bezier(.2, .9, .3, 1.25) .55s both; }
.wa-msg b { color: #2F6B45; }
.wa-msg em { position: absolute; inset-inline-end: 9px; bottom: 4px; font-size: 11px; font-style: normal; color: #8A8F94; }
.wa-msg em i { font-style: normal; color: #53BDEB; }
.done-char { margin-top: -18px; align-self: flex-end; margin-inline-end: 6px; }
.sc:is(.on, .off) .done-char { animation: hPop .5s cubic-bezier(.2, .9, .3, 1.25) 1.1s both; }

/* ---- copy under the stage */
.home-copy { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 0 20px max(22px, env(safe-area-inset-bottom)); text-align: center; }
.steps { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #4F5F6B; transition: color .3s ease; }
.steps li::before { content: ''; width: 100%; height: 5px; border-radius: 3px; background: #D8D0B4; transition: background-color .3s ease; }
.steps li.on { color: #10283A; }
.steps li.on::before { background: #003049; }
.headline { margin: 0; min-height: 2.2em; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 31px; line-height: 1.08; font-weight: 500; letter-spacing: -.01em; color: #003049; display: flex; align-items: center; justify-content: center; }
.headline.swap { animation: hUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.sub { margin: 0; font-size: 14px; line-height: 1.55; color: #4F5F6B; }
.home[lang="ar"] .headline, .home[lang="ku"] .headline { font-family: 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 25px; line-height: 1.32; letter-spacing: 0; }
.cta { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 4px; }
.btn-wa, .btn-mail { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-wa svg, .btn-mail svg { width: 22px; height: 22px; flex: none; }
.btn-wa { background: #003049; color: #FFFFFF; box-shadow: 0 12px 22px -12px rgba(0, 48, 73, .7); }
.btn-mail { background: #F1ECD6; color: #10283A; box-shadow: none; }
.desk-note .desk-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.desk-note .desk-mail { color: #003049; font-size: 15px; font-weight: 600; text-decoration: none; }
.desk-note[lang="ar"], .desk-note[lang="ku"] { font-family: 'Noto Kufi Arabic', 'Readex Pro', system-ui, sans-serif; }

/* ---- splash, plays once (from the canvas design XSSplash) */
.splash { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: #00243A; color: #FBF8EE; animation: splashOut .6s cubic-bezier(.6, 0, .3, 1) 2.2s both; }
.splash svg { width: 120px; height: 120px; display: block; overflow: visible; }
.splash .turn { transform-origin: 50px 50px; animation: xsTurn 1.1s cubic-bezier(.3, .7, .2, 1) .2s both; }
.splash .petal { transform-origin: 50px 50px; animation: xsPetal .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.splash .words { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: hUp .6s cubic-bezier(.2, .8, .2, 1) .7s both; }
.splash .en { font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.splash .ku { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.2; color: #F77F00; }
@keyframes xsPetal { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes xsTurn { from { transform: rotate(-90deg); } to { transform: none; } }
@keyframes splashOut { to { transform: translateY(-100%); visibility: hidden; } }

/* desktop pitch next to the phone */
.desk-note .kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #A64B00; }

@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
  .splash { display: none; }
  .home { overflow-y: auto; height: auto; min-height: 100%; }
  .phone { overflow-y: auto; }
  .story { flex: none; display: flex; flex-direction: column; gap: 18px; padding: 12px 0; }
  .sc { position: relative; inset: auto; padding: 0 16px; opacity: 1; }
  .tap { display: none; }
  .steps { display: none; }
  .bk-tile.pick { box-shadow: 0 0 0 3px #003049; }
  .bk-slots .pick { background: #003049; color: #FFFFFF; }
  .ig-link { background: rgba(143, 166, 245, .18); }
}
