@font-face { font-family: V; font-weight: 400; font-display: swap; src: url(fonts/vazirmatn-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC; }
@font-face { font-family: V; font-weight: 500; font-display: swap; src: url(fonts/vazirmatn-arabic-500-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC; }
@font-face { font-family: V; font-weight: 700; font-display: swap; src: url(fonts/vazirmatn-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC; }
@font-face { font-family: V; font-weight: 900; font-display: swap; src: url(fonts/vazirmatn-arabic-900-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC; }
@font-face { font-family: V; font-weight: 400; font-display: swap; src: url(fonts/vazirmatn-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: V; font-weight: 700; font-display: swap; src: url(fonts/vazirmatn-latin-700-normal.woff2) format("woff2"); }

:root {
  --night: #071029; --dusk: #10214c; --blue: #27437a; --moon: #f3f1df; --ink: #17200a; --paper: #eef3ff;
  --marker: #e6f35c; --wood: #f4e4c6; --bark: #2c1c0e; --dawn-a: #f6b48a; --dawn-b: #fde7b8;
  --gutter: clamp(20px, 5vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; font-family: V, Tahoma, sans-serif; color: var(--paper); font-size: 17px; line-height: 1.9; overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; top: -60px; right: 16px; z-index: 40; background: var(--marker); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }

/* The sky: fixed, and driven by how far down the page you are (--p). */
.sky { position: fixed; inset: 0; z-index: -3; background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 58%, var(--blue) 100%); overflow: hidden; }
.sky-dawn { position: absolute; inset: 0; opacity: var(--dawn, 0); background: linear-gradient(180deg, #7c6aa6 0%, var(--dawn-a) 52%, var(--dawn-b) 100%); }
.stars { position: absolute; inset: 0 0 25% 0; opacity: calc(1 - var(--dawn, 0) * 1.3); }
.stars i { position: absolute; border-radius: 50%; background: #fff; animation: twinkle var(--t, 4s) ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .25; } to { opacity: .95; } }
.moon { position: absolute; top: 12vh; left: 8vw; width: clamp(64px, 8vw, 118px); aspect-ratio: 1; border-radius: 50%; box-shadow: inset calc(clamp(64px, 8vw, 118px) * .28) 0 0 0 var(--moon); filter: drop-shadow(0 0 26px rgba(235, 240, 255, .45)); transform: translate(calc(var(--p, 0) * -14vw), calc(var(--p, 0) * 46vh)); opacity: calc(1 - var(--dawn, 0) * 1.6); }
.sun { position: absolute; left: 50%; bottom: 0; width: 44vmin; aspect-ratio: 1; margin-left: -22vmin; border-radius: 50%; background: radial-gradient(circle, #fff6d6 0 42%, #ffd68a 58%, rgba(255, 190, 110, 0) 72%); transform: translateY(calc(70% - var(--dawn, 0) * 52%)); opacity: var(--dawn, 0); }

/* The tree, with the camera moving over it. */
.stage { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.camera { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
/* The picture's leaves touch its top edge; fading the top few pixels keeps them from ending in a straight line. */
.tree { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 2.6%); mask-image: linear-gradient(to bottom, transparent 0, #000 2.6%); }
.tree { display: block; width: 100%; height: auto; filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .35)); user-select: none; animation: grow 1.7s cubic-bezier(.2, .75, .2, 1) both; }
@keyframes grow { from { clip-path: circle(0% at 50% 96%); transform: translateY(5%); } to { clip-path: circle(120% at 50% 96%); transform: none; } }
.glow { position: absolute; width: 46vmin; aspect-ratio: 1; margin: -23vmin 0 0 -23vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 228, 150, .34), rgba(255, 228, 150, 0) 68%); mix-blend-mode: screen; opacity: 0; transition: opacity .5s; }
.flies { position: absolute; inset: 0; opacity: calc(1 - var(--dawn, 0)); }
.flies b { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #f4ff9e; box-shadow: 0 0 16px 6px rgba(226, 255, 120, .6); animation: drift var(--t, 9s) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0); opacity: .25; } to { transform: translate(var(--x, 30px), var(--y, -40px)); opacity: 1; } }

/* The gnomes. The page's own sections let clicks through, so the one walking behind them can still be reached. */
@keyframes perch-in { from { opacity: 0; } to { opacity: 1; } }
/* The house's room names and signs live inside the camera and grow with it. */
.camera { container-type: inline-size; }
.rooms { position: absolute; inset: 0; pointer-events: none; animation: perch-in .7s 1.5s both; }
.rtag { position: absolute; translate: -50% -42%; padding: .18em .7em .24em; border-radius: .7em; white-space: nowrap; color: #2c1c0e; font-weight: 900; line-height: 1.35;
  font-size: max(9px, 1.9cqi); background: linear-gradient(180deg, #fffaf0, #f3e2c3); box-shadow: 0 0 0 1px rgba(110, 70, 30, .35), 0 6px 14px -5px rgba(55, 30, 8, .6); }
.lsign { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #4a2c10; text-align: center; line-height: 1.15; }
.lsign b { font-weight: 900; font-size: max(9px, 2.9cqi); }
.lsign small { font-weight: 700; font-size: max(8px, 1.9cqi); opacity: .85; }
/* The walker steps aside at dawn, where the footer's links are and a gnome already cheers. */
.walkway .gnome { opacity: calc(1 - var(--dawn, 0) * 1.4); transition: opacity .3s; }
.walkway { position: fixed; inset: auto 0 0; height: 140px; z-index: -1; pointer-events: none; overflow: hidden; animation: perch-in .8s 2s both; }
body { pointer-events: none; }
.skip, .nav, .hero > *, .panel, .dawn > *, .foot { pointer-events: auto; }
.dawn-gnome { position: relative; display: block; width: 96px; height: 96px; }
.dawn-gnome .gnome { position: absolute; bottom: 0; left: 50%; translate: -50% 0; }

/* The top bar. */
.nav { position: fixed; top: 0; inset-inline: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); transition: color .25s; }
.nav.solid { background: linear-gradient(180deg, rgba(7, 16, 41, .88), rgba(7, 16, 41, 0)); padding-bottom: 34px; }
.nav.day { color: var(--bark); }
.nav.day.solid { background: linear-gradient(180deg, rgba(124, 106, 166, .55), rgba(124, 106, 166, 0)); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 24px; text-decoration: none; }
.brand-logo { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 24px); }
.link { font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 14px; background: var(--marker); color: var(--ink); font-weight: 900; text-decoration: none; white-space: nowrap; transition: transform .15s; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translateY(0); }
.btn-big { min-height: 58px; padding: 0 34px; font-size: 20px; border-radius: 18px; }
.btn-ink { background: var(--bark); color: var(--wood); }
.link-big { font-size: 18px; }

/* The first screen. */
.hero { min-height: 100svh; padding: 18vh var(--gutter) 6vh; display: flex; flex-direction: column; align-items: flex-start; }
.hero-title { font-size: clamp(64px, 10.6vw, 190px); font-weight: 900; line-height: 1; letter-spacing: -.02em; display: flex; flex-wrap: wrap; column-gap: .22em; max-width: 5em; }
.hero-title span { display: inline-block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.35s + var(--i, 0) * .14s); }
.hero-title span:nth-child(2) { --i: 1; }
.hero-title span:nth-child(3) { --i: 2; }
@keyframes rise { from { opacity: 0; transform: translateY(.3em); } to { opacity: 1; transform: none; } }
.hero-sub { font-size: clamp(18px, 1.7vw, 24px); max-width: 24em; margin-top: 18px; line-height: 1.8; animation: rise .9s .85s both; }
.hero-cta { display: flex; align-items: center; gap: 22px; margin-top: 26px; flex-wrap: wrap; animation: rise .9s 1s both; }

/* One screen per shelf. The text scrolls; the tree stays and the camera moves. */
.chapters { position: relative; }
.chapter { min-height: 130vh; display: flex; align-items: center; padding: 8vh var(--gutter); }
.panel { width: min(100%, 27rem); padding: 26px 28px 28px; border-radius: 26px 26px 26px 6px; background: rgba(7, 16, 41, .78); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .7); }
.panel h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 900; line-height: 1.22; letter-spacing: -.01em; }
.panel p { margin-top: 12px; color: rgba(238, 243, 255, .86); }
.demo { margin-top: 20px; }

.demo-timer { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 18px; border-radius: 18px; background: var(--wood); color: var(--bark); }
.timer-subject { font-weight: 700; }
.timer-digits { font-size: clamp(32px, 4vw, 46px); font-weight: 900; font-variant-numeric: tabular-nums; direction: ltr; }

.week { display: grid; grid-template-columns: auto 1fr; gap: 7px 10px; align-items: center; font-size: 12px; }
.day { font-weight: 700; color: rgba(238, 243, 255, .8); }
.lane { position: relative; height: 30px; border-radius: 8px; background: rgba(238, 243, 255, .09); }
.box { position: absolute; top: 2px; bottom: 2px; right: calc(var(--s) * 1%); width: calc(var(--w) * 1%); min-width: 44px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 11px; color: #fff; overflow: hidden; white-space: nowrap; opacity: 0; transform: translateY(-16px) scale(1.08); }
.box.a { background: #e5484d; } .box.b { background: #3e63dd; } .box.c { background: #5b7a99; } .box.d { background: #12a594; }
.on .box { animation: drop .5s cubic-bezier(.2, 1.3, .4, 1) forwards; }
.on .lane:nth-of-type(n) .box:nth-child(2) { animation-delay: .25s; }
.week .lane:nth-child(4) .box { animation-delay: .35s; }
.week .lane:nth-child(6) .box { animation-delay: .6s; }
.week .lane:nth-child(6) .box:nth-child(2) { animation-delay: .85s; }
.week .lane:nth-child(8) .box { animation-delay: 1.1s; }
@keyframes drop { to { opacity: 1; transform: none; } }

.demo-chat { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.7; }
.bubble { align-self: flex-start; max-width: 88%; padding: 7px 13px; border-radius: 16px 16px 16px 4px; background: rgba(238, 243, 255, .13); opacity: 0; transform: translateY(10px); }
.bubble b { display: block; font-size: 11px; color: var(--marker); }
.bubble.mine { align-self: flex-end; background: #3e63dd; color: #fff; border-radius: 16px 16px 4px 16px; }
.on .bubble { animation: drop .4s ease-out forwards; }
.on .bubble:nth-child(2) { animation-delay: .8s; }
.on .bubble:nth-child(3) { animation-delay: 1.6s; }

.demo-plan { padding: 14px 18px; border-radius: 18px; background: var(--wood); color: var(--bark); display: flex; flex-direction: column; gap: 8px; }
.plan-bar { height: 8px; border-radius: 8px; background: rgba(44, 28, 14, .16); overflow: hidden; }
.plan-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: #12a594; transition: width 1.3s cubic-bezier(.2, .8, .2, 1) .2s; }
.on .plan-bar i { width: 72%; }
.plan-note { font-size: 13px; color: rgba(44, 28, 14, .75); }

.demo-league { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.demo-league li { padding: 6px 14px; border-radius: 12px; background: rgba(238, 243, 255, .09); transition: background .5s, color .5s, transform .5s; }
.demo-league li:nth-child(1) { margin-inline-end: 0; }
.demo-league li:nth-child(2) { margin-inline-end: 8%; }
.demo-league li:nth-child(3) { margin-inline-end: 16%; }
.demo-league li:nth-child(4) { margin-inline-end: 24%; }
.on.demo-league li.here { background: var(--marker); color: var(--ink); transform: translateX(-6px); }

/* Dawn: the sky has turned, and the words sit on it directly. */
.dawn { min-height: 130vh; padding: 22vh var(--gutter) 10vh; color: var(--bark); display: flex; flex-direction: column; justify-content: center; gap: 44px; }
.dawn-title { font-size: clamp(48px, 9.5vw, 150px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 22px 36px; }
.people b { display: block; font-size: 22px; font-weight: 900; line-height: 1.4; }
.people li { line-height: 1.7; }
.dawn-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dawn-cta p { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; }

.foot { color: var(--bark); padding: 18px var(--gutter) 30px; display: flex; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; font-size: 14px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { font-weight: 700; text-underline-offset: 4px; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  .hero { padding-top: 13vh; }
  .hero-title { font-size: clamp(64px, 21vw, 150px); }
  .chapter { min-height: 125vh; align-items: flex-end; padding-bottom: 7vh; }
  .panel { padding: 20px 20px 22px; width: 100%; }
  .glow { width: 70vmin; margin: -35vmin 0 0 -35vmin; }
  .dawn-gnome { width: 72px; height: 72px; }
  .dawn { padding-top: 16vh; }
}

/* No flying camera, no drifting: the tree sits still behind the page and each panel is
   simply complete. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .box, .bubble { opacity: 1; transform: none; }
  .plan-bar i { width: 72%; }
  .demo-league li.here { background: var(--marker); color: var(--ink); }
  .stars i { opacity: .7; }
  .flies { display: none; }
}
