:root {
  --sheet: #EDEAE4;
  --sky: #A2A7B1;
  --ink: #14170E;
  --black: #111111;
  --body: #45443F;
  --muted: #8A877F;
  --nav: #9A9A9A;
  --rule: #D6D1C7;
  --frame: #CFC9BD;
  --bar: #F6F4EF;
  --url: #6E6B63;
  --green: #3E7B4F;
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--sky-top, #0b1625); color: var(--black); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.dot.hollow { background: none; border: 1.5px solid var(--muted); }
.kicker { font-weight: 500; font-size: 11px; line-height: 16px; letter-spacing: .12em; color: var(--muted); }

/* ---------- Sheet: sidebar + main, rounded over the sky ---------- */
.sheet {
  display: grid; grid-template-columns: 290px minmax(0, 1080px) 1fr;
  position: relative; z-index: 2;
  background: var(--sheet); border-radius: 0 0 34px 34px;
}
.side {
  position: fixed; top: 40px; left: max(54px, calc(50vw - 666px)); z-index: 6;
  display: flex; flex-direction: column;
}
@media (min-width: 1241px) {
  .main { grid-column: 2; }
}
.side a {
  padding-block: 3px; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 24px; color: var(--nav);
  transition: color .25s ease, transform .25s ease;
}
.side a:hover { color: var(--black); transform: translateX(3px); }
.side a[aria-current] { color: var(--black); }
.main { display: flex; flex-direction: column; gap: 96px; padding: 44px 0 144px; min-width: 0; }

/* ---------- Header ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.intro { display: flex; flex-direction: column; gap: 18px; }
h1 { font-weight: 500; font-size: 42px; line-height: 48px; letter-spacing: -.02em; color: var(--ink); }
h1 em { font-family: var(--serif); font-size: 48px; letter-spacing: 0; }
.lede { max-width: 420px; font-size: 18px; line-height: 28px; color: var(--body); }
.contents { display: flex; flex-direction: column; flex-shrink: 0; width: 420px; }
.contents .kicker { padding-bottom: 12px; }
.contents a { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); transition: padding .3s var(--ease); }
.contents a:last-child { border-bottom: 1px solid var(--rule); }
.contents a:hover { padding-left: 6px; }
.contents .n { width: 40px; flex-shrink: 0; font-size: 13px; line-height: 20px; color: var(--muted); }
.contents .t { flex-grow: 1; font-weight: 500; font-size: 15px; line-height: 20px; color: var(--ink); }
.contents .c { font-size: 13px; line-height: 20px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 32px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 28px; border-top: 1px solid var(--rule); }
.section-head h2 { display: flex; align-items: baseline; gap: 14px; font-weight: 500; font-size: 20px; line-height: 24px; color: var(--ink); }
.section-head h2 .n { font-weight: 400; font-size: 13px; line-height: 20px; color: var(--muted); }
.section-head p:not(.legend):not(.count) { margin-top: 8px; padding-left: 31px; font-size: 14px; line-height: 23px; color: var(--body); }
.legend { display: flex; align-items: center; gap: 20px; font-size: 13px; line-height: 20px; color: var(--body); }
.legend span { display: flex; align-items: center; gap: 8px; }
.count { font-size: 13px; line-height: 20px; color: var(--body); }

/* ---------- Toy websites: a browser frame with the real site inside ---------- */
.toy { display: flex; flex-direction: column; gap: 28px; }
.toy + .toy { margin-top: 36px; }
.frame { overflow: hidden; background: var(--bar); border: 1px solid var(--frame); border-radius: 10px; }
.bar { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 16px; border-bottom: 1px solid var(--rule); }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.url { flex-grow: 1; font-size: 12px; line-height: 16px; color: var(--url); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 12px; line-height: 16px; color: var(--green); }
.live .dot { animation: pulse 2s ease-in-out infinite; }
.open { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--ink); white-space: nowrap; margin-left: 2px; }
.open:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the toy renders at desktop width (1440) and is scaled to the frame by main.js */
.site { position: relative; aspect-ratio: 1078 / 620; overflow: hidden; background: #fff; }
.site iframe { position: absolute; left: 0; top: 0; width: 1440px; height: 828px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .7486)); pointer-events: none; }
.frame.is-awake iframe { pointer-events: auto; }
.wake { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 20px; }
.frame.is-awake .wake { visibility: hidden; }
.pill {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--ink); color: var(--sheet); font-weight: 500; font-size: 13px; line-height: 16px;
  box-shadow: 0 8px 20px #14170E33; transition: transform .35s var(--ease);
}
.wake:hover .pill { transform: translateY(-3px); }
.wake .pill svg { animation: breathe 1.8s ease-in-out infinite; }

.details { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.story { display: flex; flex-direction: column; gap: 10px; width: 430px; }
.story h3 { font-weight: 500; font-size: 24px; line-height: 30px; letter-spacing: -.03em; color: var(--black); }
.story h3 em { margin-left: 8px; font-family: var(--serif); font-size: 22px; letter-spacing: 0; color: var(--body); }
.story p:last-child { font-size: 16px; line-height: 26px; color: var(--body); }
.facts { width: 540px; flex-shrink: 1; border-top: 1px solid var(--rule); }
.facts div { display: flex; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 22px; }
.facts dt { width: 130px; flex-shrink: 0; color: var(--muted); }
.facts dd { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.facts div:first-child dd { font-weight: 500; }

/* ---------- Small experiments ---------- */
.sketches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.sketch { display: flex; flex-direction: column; gap: 14px; }
.canvas {
  position: relative; display: block; aspect-ratio: 340 / 250; overflow: hidden; border-radius: 10px;
  background: var(--bg) var(--thumb) center / cover no-repeat;
}
.canvas iframe { position: absolute; left: 50%; top: 50%; border: 0; pointer-events: none; transform-origin: 0 0; }
.canvas::after { content: ""; position: absolute; inset: 0; background: #0000; transition: background .4s; }
.sketch:hover .canvas::after { background: #FFFFFF14; }
.canvas { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.sketch:hover .canvas { transform: translateY(-4px); box-shadow: 0 14px 28px #14170E26; }
.live-pill {
  position: absolute; left: 12px; bottom: 12px; z-index: 1; gap: 6px; padding: 5px 10px;
  background: #0C1710B8; color: #CFE3D6; box-shadow: none;
  font-weight: 600; font-size: 10px; line-height: 12px; letter-spacing: .14em;
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #8FD1A3; animation: pulse 2s ease-in-out infinite; }
.label { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.label > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.label b { font-weight: 500; font-size: 17px; line-height: 24px; letter-spacing: -.01em; color: var(--black); }
.label small { font-weight: 500; font-size: 11px; line-height: 16px; letter-spacing: .1em; color: var(--muted); }
.go { font-weight: 500; font-size: 13px; line-height: 24px; color: var(--ink); white-space: nowrap; transition: translate .3s var(--ease); }
.sketch:hover .go { translate: 4px 0; }

/* ---------- Shared site footer: paper bar, then the Dhaka sky behind the sheet ---------- */
.secondary-ending { grid-column: 1 / -1; padding: 26px max(32px, calc((100vw - 1440px) / 2 + 54px)) 30px; border-top: 1px solid #DED8CD; }
.studio-ending__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.footer__wordmark { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; line-height: 40px; color: var(--black); }
.footer__nav { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 22px; }
.footer__nav a { color: #6B6862; transition: color .2s ease; }
.footer__nav a:hover, .footer__nav a[aria-current] { color: var(--black); }
.footer__nav .sep { color: #C6C1B7; }
.footer__social { display: flex; align-items: center; justify-content: flex-end; gap: 20px; color: #6B6862; }
.footer__social a { display: flex; transition: color .2s ease; }
.footer__social a:hover { color: var(--black); }

.footer-reveal-spacer { position: relative; z-index: 1; height: 300px; pointer-events: none; }
.footer {
  position: fixed; inset: auto 0 0; z-index: 0; height: 300px; overflow: hidden;
  background: linear-gradient(180deg, #07101D 0%, #0E2138 46%, #182B3D 100%);
}
.footer[data-sky] { background: linear-gradient(180deg, var(--sky-top), var(--sky-middle) 28%, var(--sky-middle) 72%, var(--sky-bottom)); }
.footer__band { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; padding: 30px 24px 66px; text-align: center; }
.footer__cta { max-width: 620px; font-size: 18px; font-weight: 500; line-height: 28px; letter-spacing: -.01em; color: var(--sky-ink, #EDE7DA); }
.footer__cta span { font-weight: 400; color: var(--sky-ink, #8DA1B6); }
.footer__meta { font-size: 13px; line-height: 20px; color: var(--sky-ink, #5C7186); }

.sky-pill {
  position: absolute; left: 20px; bottom: 18px; display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px 0 4px; border-radius: 999px;
  background: rgb(16 20 31 / .68); color: #fff; font-size: 11px;
  box-shadow: 0 3px 12px rgb(0 0 0 / .08); backdrop-filter: blur(10px);
}
.sky-pill__live { min-width: 44px; height: 44px; padding: 0 6px; }
.sky-pill__live[aria-pressed="true"] { font-weight: 600; }
.sky-pill__range { appearance: none; width: 88px; height: 44px; background: transparent; cursor: pointer; }
.sky-pill__range::-webkit-slider-runnable-track { height: 8px; background: repeating-linear-gradient(90deg, #ffffff70 0 1px, transparent 1px 12px) center / 100% 6px no-repeat; }
.sky-pill__range::-moz-range-track { height: 6px; background: repeating-linear-gradient(90deg, #ffffff70 0 1px, transparent 1px 12px); }
.sky-pill__range::-webkit-slider-thumb { appearance: none; width: 3px; height: 14px; margin-top: -3px; border-radius: 2px; background: #fff; }
.sky-pill__range::-moz-range-thumb { width: 3px; height: 14px; border: 0; border-radius: 2px; background: #fff; }
.sky-pill__value { min-width: 33px; font-variant-numeric: tabular-nums; }
.sky-pill :focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: 4px; }

/* ---------- Motion ---------- */
@keyframes pulse { 50% { opacity: .35; } }
@keyframes breathe { 50% { transform: scale(1.18); } }
.js [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; translate: none; }
.sketches .sketch:nth-child(2) { transition-delay: .08s; }
.sketches .sketch:nth-child(3) { transition-delay: .16s; }

/* ---------- Smaller screens ---------- */
/* motion reel: muted preview plays in view, the full version with sound lives at /reel */
.reel__stage { position: relative; display: block; aspect-ratio: 16 / 9; background: #0e0d0b; }
.reel__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.reel__stage .wake { pointer-events: none; }
.reel__stage:hover .pill { transform: translateY(-3px); }

@media (max-width: 1240px) {
  .sheet { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; gap: 22px; padding: 32px 32px 0; }
  .main { padding: 72px 32px 112px; }
}
@media (max-width: 960px) {
  .head { flex-direction: column; align-items: stretch; }
  .contents { width: auto; }
  .details { flex-direction: column; gap: 24px; }
  .story, .facts { width: auto; }
  .sketches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .side a { padding: 0; font-size: 18px; line-height: 26px; font-weight: 500; transform: none; }
  .site { aspect-ratio: 3 / 4; }
  .legend { display: none; }
  .bar { gap: 10px; padding-inline: 12px; }
  .dots, .live { display: none; }
  .url, .open { font-size: 11px; }
  .sketches { grid-template-columns: 1fr; }
  .main { gap: 72px; padding-inline: 20px; }
  .side { padding-inline: 20px; }

  /* Phone: each site gets the full width and most of the screen height, so it reads at real size */
  h1 { font-size: 36px; line-height: 42px; }
  h1 em { font-size: 42px; }
  .section-head p:not(.legend):not(.count) { padding-left: 0; }
  .toy { gap: 22px; }
  .toy + .toy { margin-top: 64px; }
  .frame { margin-inline: -20px; border-inline: 0; border-radius: 0; }
  .site { aspect-ratio: auto; height: min(78svh, 680px); }
  .wake { justify-content: center; padding: 18px; }
  .wake .pill { padding: 12px 18px 12px 14px; font-size: 14px; }
  .story { gap: 8px; }
  .story h3 { font-size: 26px; line-height: 32px; }
  .story h3 em { display: block; margin: 2px 0 0; font-size: 24px; line-height: 28px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; }
  .facts div { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 12px 12px 0; }
  .facts dt { width: auto; font-size: 12px; line-height: 16px; }
  .facts dd { font-size: 14px; line-height: 20px; }
}
@media (max-width: 900px) {
  .studio-ending__bar { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .footer__social { justify-content: center; }
}
@media (max-width: 720px) {
  .secondary-ending { padding: 24px 20px 26px; }
  .footer__band { padding-inline: 28px; }
  .footer__cta { font-size: 16px; line-height: 25px; }
  .footer__meta { font-size: 12px; }
  .sky-pill { left: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; translate: none; }
}
