/* by Najma — «سماء نجمة». The whole site is one sky; every invitation is a star.
   Fonts: El Messiri (display) + Readex Pro (text). No cards, no boxes: text floats on the sky,
   UI is made of light (thin lines, glows, small stars). */
:root {
  --night-0: #170d26; --night-1: #241539; --night-2: #3b2459; --night-3: #6b4684; --dusk: #c99bbd;
  --ink: #fff8f4; --ink-soft: rgba(255, 244, 240, .74); --ink-faint: rgba(255, 244, 240, .5);
  --gold: #f3d79a; --gold-deep: #d6a952; --line: rgba(255, 240, 230, .16);
  --display: "El Messiri", "Readex Pro", serif; --text: "Readex Pro", system-ui, sans-serif;
  --dusk-amt: 0;            /* 0 = night, 1 = the logo's dusk (home, at the top) */
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; font: 300 16.5px/1.8 var(--text); color: var(--ink);
  background: linear-gradient(180deg, var(--night-0), var(--night-1) 45%, var(--night-2)) fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* the logo's dusk, fading in at the top of the home page */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: var(--dusk-amt);
  background: radial-gradient(90% 60% at 50% 30%, #f2d4e4, transparent 70%), linear-gradient(180deg, #b9a3d6, #e4c3dc 55%, #f3d6dc);
}
#sky-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.3; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.latin { font: 500 11px/1 var(--text); letter-spacing: .5em; direction: ltr; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 99; background: #fff; color: #241539; padding: 8px 14px; border-radius: 10px; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.glow { text-shadow: 0 0 22px rgba(255, 214, 236, .45), 0 2px 12px rgba(20, 6, 40, .55); }

/* ---------- header: the gold guide star + menu ---------- */
.site-header { position: fixed; z-index: 40; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 18px) 22px 18px; pointer-events: none; background: linear-gradient(180deg, rgba(23, 13, 38, .72), rgba(23, 13, 38, 0)); }
.home .site-header { background: none; }
.site-header > * { pointer-events: auto; }
.guide { display: inline-flex; align-items: center; gap: 12px; }
.guide svg { filter: drop-shadow(0 0 8px rgba(243, 215, 154, .8)); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.guide:hover svg { transform: rotate(45deg) scale(1.15); }
.guide .latin { opacity: .85; }
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-btn { position: relative; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.menu-btn span, .menu-btn span::before { display: block; width: 24px; height: 1.5px; background: var(--ink); transition: transform .35s ease; content: ""; }
.menu-btn span::before { transform: translateY(7px); }
.menu-toggle:checked + .menu-btn span { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle:checked + .menu-btn span::before { transform: rotate(-90deg); }
.menu { position: fixed; inset: 0; z-index: 1; display: grid; place-items: center; background: rgba(23, 13, 38, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
.menu-toggle:checked ~ .menu { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.menu ul { list-style: none; margin: 0; padding: 0; text-align: center; display: grid; gap: 10px; }
.menu a { display: block; font: 600 clamp(2rem, 7vw, 3rem)/1.35 var(--display); color: var(--ink-soft); transition: color .3s; }
.menu a small { display: block; font: 300 13px var(--text); color: var(--ink-faint); margin-top: -2px; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--gold); }

/* ---------- home scenes ---------- */
.scene { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 120px 24px; text-align: center; }
.arrival { padding: 0; overflow: hidden; }
.arrival-art { position: absolute; inset: 0; display: grid; place-items: center; }
.arrival-art video, .arrival-art img {
  height: 100%; width: auto; max-width: none; aspect-ratio: 9 / 16; object-fit: cover;
  -webkit-mask-image: radial-gradient(48% 50% at 50% 46%, #000 62%, transparent 100%); mask-image: radial-gradient(48% 50% at 50% 46%, #000 62%, transparent 100%);
}
@media (max-aspect-ratio: 9 / 16) { .arrival-art video, .arrival-art img { width: 100%; height: auto; min-height: 100%; -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 700px) { .arrival-art video, .arrival-art img { width: 100%; height: 100%; -webkit-mask-image: none; mask-image: none; } }
.arrival-text { position: absolute; inset-inline: 0; bottom: max(110px, 13svh); padding: 0 24px; }
.arrival h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); font-weight: 700; }
.arrival p { margin-top: 10px; font-size: clamp(.95rem, 2.4vw, 1.1rem); color: rgba(255, 250, 248, .92); }
.cue { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 250, 248, .86); }
.cue i { display: block; width: 1px; height: 44px; background: linear-gradient(transparent, #fff); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

.promise p { max-width: 20ch; margin: 0 auto; font: 600 clamp(1.8rem, 6vw, 3.4rem)/1.45 var(--display); }
.promise p em { font-style: normal; color: var(--gold); }

/* ---------- the sky (constellations) ---------- */
.sky-section { padding: 110px 0 60px; text-align: center; }
.sky-head h2 { font-size: clamp(2rem, 6vw, 3.2rem); }
.sky-head p { color: var(--ink-soft); margin-top: 6px; }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin: 28px 16px 0; }
.filters button { padding: 6px 2px; font-size: 15px; color: var(--ink-faint); border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.filters button[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.skymap { position: relative; width: min(100%, 1100px); margin: 10px auto 0; touch-action: pan-y; }
.skymap svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.skymap svg.lines line { stroke: rgba(243, 215, 154, .4); stroke-width: 1; transition: opacity .5s; }
.c-label { position: absolute; transform: translate(50%, -50%); text-align: center; pointer-events: none; transition: opacity .5s; white-space: nowrap; }
.c-label b { display: block; font: 600 clamp(1.15rem, 3.4vw, 1.5rem) var(--display); }
.c-label small { font-size: 12px; color: var(--ink-faint); }
.star { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; transition: opacity .5s, transform .5s; }
.star i { width: var(--r); height: var(--r); border-radius: 50%; background: #fffaf0; box-shadow: 0 0 calc(var(--r) * 2) calc(var(--r) * .6) rgba(255, 236, 205, var(--b)), 0 0 calc(var(--r) * 5) calc(var(--r) * 1.2) rgba(243, 215, 154, calc(var(--b) * .45)); animation: twinkle var(--tw) ease-in-out infinite; }
.star.bright i::before, .star.bright i::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--r) * 5); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 245, 225, .8), transparent); transform: translate(-50%, -50%); }
.star.bright i::after { transform: translate(-50%, -50%) rotate(90deg); }
.star:hover i, .star.peeked i { transform: scale(1.5); }
.star.dim { opacity: .18; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.peek {
  position: absolute; z-index: 5; display: flex; gap: 12px; align-items: center; width: max-content; max-width: 270px; padding: 9px 9px 9px 16px;
  border-radius: 18px; background: rgba(28, 16, 46, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(243, 215, 154, .32), 0 18px 40px -18px #000; text-align: start;
  opacity: 0; transform: translate(0, calc(-100% - 22px)) scale(.96); transition: opacity .25s, transform .25s; pointer-events: none;
}
.peek.on { opacity: 1; transform: translate(0, calc(-100% - 28px)); pointer-events: auto; }
.peek img { width: 50px; height: 89px; object-fit: cover; border-radius: 10px; }
.peek b { display: block; font: 600 1.05rem/1.35 var(--display); } .peek small { font-size: 12px; color: var(--ink-faint); }
.peek .go { display: block; margin-top: 4px; font-size: 12px; color: var(--gold); }
.sky-count { margin-top: 18px; font-size: 13px; color: var(--ink-faint); }
.switch { display: inline-flex; margin-top: 16px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); overflow: hidden; }
.switch button { padding: 8px 20px; font-size: 14px; color: var(--ink-faint); }
.switch button[aria-pressed="true"] { color: var(--ink); background: rgba(255, 255, 255, .12); }
.star-list { display: none; list-style: none; padding: 0 20px; margin: 30px auto 0; width: min(100%, 1100px); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; text-align: start; }
.show-list .star-list { display: grid; } .show-list .skymap { display: none; }
.star-list a { display: flex; flex-direction: column; gap: 10px; }
.star-list img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 1px rgba(243, 215, 154, .25), 0 20px 40px -24px #000; transition: transform .4s, box-shadow .4s; }
.star-list a:hover img { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(243, 215, 154, .6), 0 0 34px -6px rgba(243, 215, 154, .45); }
.star-list b { font: 600 1.02rem/1.35 var(--display); display: block; } .star-list small { font-size: 12px; color: var(--ink-faint); }
.star-list li[hidden] { display: none; }
.empty { display: none; margin: 40px auto; color: var(--ink-soft); font-family: var(--display); font-size: 1.3rem; }
.empty.on { display: block; }
.more { display: inline-block; margin-top: 26px; color: var(--gold); font-size: 15px; border-bottom: 1px solid rgba(243, 215, 154, .5); padding-bottom: 3px; }

/* ---------- link or video ---------- */
.deliver h2 { font-size: clamp(2rem, 6.5vw, 3.4rem); margin-bottom: 44px; }
.duo { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: clamp(26px, 9vw, 120px); }
.duo::before { /* the line of light joining the two stars */
  content: ""; position: absolute; top: 18px; left: 50%; width: clamp(120px, 30vw, 380px); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 12px rgba(243, 215, 154, .7);
}
.way { width: min(42vw, 230px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.way .node { width: 36px; height: 36px; display: grid; place-items: center; }
.way .node svg { filter: drop-shadow(0 0 10px rgba(243, 215, 154, .9)); }
.mini { width: 100%; aspect-ratio: 9 / 18; border-radius: 26px; padding: 5px; background: #120a1c; box-shadow: 0 0 0 1px rgba(243, 215, 154, .3), 0 30px 60px -30px #000; overflow: hidden; }
.mini video, .mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 21px; }
.way h3 { font-size: 1.35rem; } .way p { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.deliver .note { margin-top: 40px; color: var(--ink-soft); }

/* ---------- make your star ---------- */
.born { position: relative; width: 210px; height: 210px; margin: 0 auto 10px; }
.born::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 243, 214, .95), rgba(243, 215, 154, .45) 28%, transparent 68%); animation: breathe 5s ease-in-out infinite; }
.born svg { position: absolute; inset: 0; margin: auto; width: 70px; height: 70px; filter: drop-shadow(0 0 14px rgba(255, 230, 180, .9)); }
@keyframes breathe { 0%, 100% { transform: scale(.9); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
.yours h2 { font-size: clamp(2.2rem, 7vw, 3.6rem); }
.yours .lead { max-width: 34ch; margin: 14px auto 0; color: var(--ink-soft); }
.factors { width: min(100%, 460px); margin: 38px auto 0; text-align: start; }
.factors div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.factors span:last-child { color: var(--ink-faint); font-size: 14px; }
.light {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border-radius: 99px;
  color: var(--gold); box-shadow: inset 0 0 0 1px rgba(243, 215, 154, .75); font-size: 15px; transition: background .3s, box-shadow .3s, color .3s;
}
.light:hover { background: rgba(243, 215, 154, .12); box-shadow: inset 0 0 0 1px var(--gold), 0 0 30px -6px rgba(243, 215, 154, .55); }
.light.solid { background: rgba(243, 215, 154, .14); }
.yours .light { margin-top: 38px; }
.yours .small { margin-top: 14px; font-size: 13px; color: var(--ink-faint); }

/* ---------- questions ---------- */
.questions { place-items: start center; }
.questions h2 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 26px; }
.qa { width: min(100%, 720px); margin: 0 auto; text-align: start; }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 2px; font: 600 1.15rem var(--display); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "✦"; color: var(--gold); font-size: .8rem; transition: transform .4s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa .answer { padding: 0 2px 22px; color: var(--ink-soft); }

/* ---------- a star (one invitation) ---------- */
.star-page { position: relative; min-height: 100svh; overflow: clip; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(30px, 6vw, 90px); padding: 110px clamp(20px, 7vw, 110px) 70px; isolation: isolate; }
.star-bg { position: absolute; inset: -40px; z-index: -1; background: var(--art) center / cover; filter: blur(26px) brightness(.5) saturate(1.15); opacity: .9; }
.star-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 50%, transparent, rgba(23, 13, 38, .85)); }
.crumbs { position: absolute; top: calc(env(safe-area-inset-top) + 76px); inset-inline-start: clamp(20px, 7vw, 110px); display: flex; gap: 8px; font-size: 13px; color: var(--ink-faint); }
.crumbs a:hover { color: var(--gold); }
.star-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.device { position: relative; width: min(320px, 78vw); aspect-ratio: 9 / 18.5; padding: 7px; border-radius: 42px; background: #120a1c; box-shadow: 0 0 0 1px rgba(243, 215, 154, .4), 0 0 70px -10px rgba(243, 215, 154, .35), 0 40px 80px -40px #000; }
.device img, .device iframe { width: 100%; height: 100%; object-fit: cover; border-radius: 35px; border: 0; }
.device-play { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); padding: 13px 26px; border-radius: 99px; color: #241539; background: #fff8ee; font-size: 15px; font-weight: 400; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); white-space: nowrap; }
.hint { font-size: 13px; color: var(--ink-faint); }
.star-text .kicker { font-size: 14px; color: var(--gold); }
.star-text h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 6px 0 18px; }
.star-text .story { max-width: 46ch; color: var(--ink-soft); font-size: 1.04rem; }
.star-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.nb { position: absolute; bottom: 26px; display: inline-flex; align-items: center; gap: 10px; font: 500 14px var(--display); color: var(--ink-soft); transition: color .3s; }
.nb:hover { color: var(--gold); }
.nb .dot { width: 7px; height: 7px; border-radius: 50%; background: #fffaf0; box-shadow: 0 0 10px 3px rgba(243, 215, 154, .7); }
.nb-prev { inset-inline-start: clamp(20px, 7vw, 110px); } .nb-next { inset-inline-end: clamp(20px, 7vw, 110px); }
.pages-strip { padding: 30px 0 80px; }
.pages-strip ul { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 4px clamp(20px, 7vw, 110px) 16px; scrollbar-width: none; }
.pages-strip ul::-webkit-scrollbar { display: none; }
.pages-strip li { flex: 0 0 min(62vw, 260px); scroll-snap-align: center; }
.pages-strip img { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 0 0 1px rgba(243, 215, 154, .22); }
@media (max-width: 860px) {
  .star-page { grid-template-columns: 1fr; text-align: center; padding-top: 120px; padding-bottom: 110px; }
  .star-text .story { margin-inline: auto; } .star-actions { justify-content: center; }
}
.reel-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(12, 6, 20, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.reel-modal video { height: min(86svh, 760px); width: auto; aspect-ratio: 9 / 16; border-radius: 22px; background: #000; }
.reel-modal button { position: absolute; top: calc(env(safe-area-inset-top) + 16px); inset-inline-end: 18px; font-size: 28px; width: 48px; height: 48px; }

/* ---------- simple pages ---------- */
.page-top { padding: 150px 24px 40px; text-align: center; }
.page-top h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); }
.page-top p { color: var(--ink-soft); margin-top: 10px; }
.prose { width: min(100% - 48px, 680px); margin: 0 auto 100px; color: var(--ink-soft); }
.prose h2 { color: var(--ink); font-size: 1.5rem; margin: 34px 0 8px; }
.prose a { color: var(--gold); }

/* ---------- footer ---------- */
.site-footer { padding: 70px 24px calc(env(safe-area-inset-bottom) + 40px); text-align: center; display: grid; justify-items: center; gap: 14px; }
.footer-logo { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%); mask-image: radial-gradient(circle, #000 55%, transparent 72%); }
.site-footer .handle { color: var(--gold); font-size: 15px; }
.site-footer .fine { font-size: 12px; color: var(--ink-faint); }

/* ---------- star fly-in transition + reveal ---------- */
.flash { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), #fff6e4 0, #f3d79a 12%, rgba(36, 21, 57, .96) 55%); transition: opacity .55s ease; }
.flying .flash { opacity: 1; }
.arrive .flash { opacity: 1; transition: none; }
.js .rise { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .star i, .cue i, .born::before { animation: none; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .flash { display: none; }
}

@media (min-aspect-ratio: 9 / 16) and (min-width: 701px) { .arrival-text { bottom: max(44px, 6svh); } .cue { display: none; } }
