:root {
  --night: #070b18;
  --navy: #0b1739;
  --cream: #fff6e8;
  --gold: #f5b942;
  --saffron: #ff7a3c;
  --glow: #3c7dff;
  --mute: #a7b3ce;
  --ink: #f6f1e6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--night);
  color: var(--ink);
  font-family: Outfit, Vazirmatn, Tahoma, sans-serif;
}

html[lang='fa'] body {
  font-family: Vazirmatn, Tahoma, sans-serif;
}

.pool,
.pointer {
  position: fixed;
  pointer-events: none;
}

.pool {
  z-index: 0;
  top: 18vh;
  left: 50%;
  width: min(920px, 90vw);
  height: min(520px, 58vh);
  background: radial-gradient(ellipse at center, rgb(60 125 255 / 0.5), transparent 68%);
  transform: translateX(-50%);
  animation: drift 8s ease-in-out infinite;
}

.pointer {
  z-index: 1;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgb(90 150 255 / 0.28), transparent 68%);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 400ms ease;
}

body.lit .pointer {
  opacity: 1;
}

.top,
main,
.colophon {
  position: relative;
  z-index: 2;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.3rem 1.3rem 0;
}

.tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang {
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid rgb(244 240 230 / 0.22);
  background: transparent;
  color: var(--ink);
  font-family: Vazirmatn, Outfit, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.lang:hover {
  background: var(--ink);
  color: var(--night);
}

.lang:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.word,
.live {
  color: inherit;
  text-decoration: none;
}

.word {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: Outfit, Vazirmatn, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dots {
  width: 1.65rem;
  height: auto;
  flex: none;
}

.dots circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: slam 0.4s cubic-bezier(0.2, 1.5, 0.3, 1) both;
}

.dots .d1 {
  fill: #7eb6ff;
  animation-delay: 0.05s;
}

.dots .d2,
.dots .d3 {
  fill: var(--ink);
}

.dots .d2 {
  animation-delay: 0.14s;
}

.dots .d3 {
  animation-delay: 0.22s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
}

.brand .dots {
  width: 1.05rem;
}

.brand .dots circle {
  animation: none;
}

html[lang='fa'] .word,
html[lang='fa'] h1,
html[lang='fa'] .work h2,
html[lang='fa'] figcaption strong {
  font-family: Lalezar, Vazirmatn, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 600;
}

.live svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.live svg {
  stroke: var(--cream);
}

.hero {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 2.6rem;
  padding: 2.4rem 1.3rem 0.6rem;
  text-align: center;
}

h1 {
  margin: 0;
  width: auto;
  max-width: 100%;
  min-width: 0;
  font-family: Outfit, Vazirmatn, sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

html[lang='fa'] h1 {
  font-size: clamp(2.35rem, 10vw, 6.4rem);
  line-height: 1.15;
}

h1 .line {
  display: block;
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

h1 .line:nth-child(2) {
  animation-delay: 0.12s;
}

h1 .line:nth-child(3) {
  animation-delay: 0.24s;
}

.lede {
  max-width: 36rem;
  margin: 1.1rem 0 0;
  color: var(--mute);
  font-size: 1.02rem;
  line-height: 2;
  animation: rise 0.8s 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.core {
  width: min(44rem, 100%);
}

.core h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.1rem);
}

html[lang='fa'] .core h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
}

.core .lede {
  margin-inline: auto;
}

.reel {
  position: relative;
  width: min(980px, 100%);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.reel:active {
  cursor: grabbing;
}

.reel:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.reel::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(245 185 66 / 0.7), transparent);
}

.reel-track {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  width: max-content;
  margin-inline: auto;
  padding: 1.35rem 0 1.1rem;
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sat {
  flex: 0 0 168px;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  opacity: 0.62;
  transform: scale(0.9);
  transition:
    transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 480ms ease;
}

.sat.is-front {
  opacity: 1;
  transform: scale(1.06);
}

.sat:focus-visible .plaque {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.plaque {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  width: 168px;
  padding: 0.95rem 0.7rem 0.8rem;
  border-radius: 22px;
  background: var(--plate);
  color: var(--ink);
  box-shadow: 0 16px 36px rgb(0 0 0 / 0.28);
}

.sat.is-front .plaque {
  box-shadow:
    0 22px 46px rgb(0 0 0 / 0.4),
    0 0 0 2px var(--rim);
}

.plaque img,
.plaque svg {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.plaque strong {
  font-family: Outfit, Vazirmatn, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plaque span {
  color: var(--rim);
  font-size: 0.68rem;
  font-weight: 800;
}

html[lang='fa'] .plaque strong {
  font-family: Lalezar, Vazirmatn, serif;
  font-weight: 400;
}

.works {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 0 2.5rem;
}

.work {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  grid-template-areas:
    "mark head"
    "mark lead"
    "facts facts"
    "foot foot";
  column-gap: 1.6rem;
  row-gap: 0.45rem;
  width: min(1180px, calc(100% - 2.4rem));
  margin: 0.85rem auto 0;
  padding: 1.7rem 1.7rem 1.45rem;
  background: var(--plate);
  color: var(--ink);
  border-inline-start: 5px solid var(--rim);
  animation: unfurl 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.work.is-on {
  border-inline-start-width: 12px;
}

.work:nth-child(2) {
  animation-delay: 0.12s;
}

.work:nth-child(3) {
  animation-delay: 0.24s;
}

.work:nth-child(4) {
  animation-delay: 0.36s;
}

.sheet-mark {
  grid-area: mark;
  align-self: start;
}

.sheet-mark svg,
.sheet-mark img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
}

#takbarg .sheet-mark img {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(12 61 40 / 0.12);
}

.sheet-mark svg path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.sheet-head,
.work-lead,
.facts,
.work-foot,
.sheet-status,
.sheet-note {
  margin: 0;
}

.sheet-head {
  grid-area: head;
  align-self: end;
}

.sheet-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--status);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--rim);
}

html[lang='fa'] .sheet-status {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.86rem;
}

html[lang='fa'] .work h2 {
  line-height: 1.2;
}

.work h2 {
  margin: 0.2rem 0 0;
  font-family: Outfit, Vazirmatn, sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.sheet-note {
  margin-top: 0.45rem;
  color: var(--quiet);
  font-size: 0.92rem;
  line-height: 1.5;
}

.work-lead {
  grid-area: lead;
  align-self: start;
  max-width: 34rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
}

.facts {
  grid-area: facts;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.1rem;
  margin-top: 0.85rem;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding-top: 0.7rem;
  border-top: 2px solid var(--rim);
}

.facts li span:first-child {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.facts li span:last-child {
  color: var(--quiet);
  font-size: 0.84rem;
  line-height: 1.6;
}

.work-foot {
  grid-area: foot;
  margin-top: 0.35rem;
}

.wait {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  color: var(--quiet);
  font-size: 0.88rem;
  font-weight: 800;
}

.open,
.live {
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.open {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0 1.05rem;
  background: var(--ink);
  color: var(--plate, var(--night));
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.open:hover {
  background: #ffe14a;
  color: #161616;
}

.live:hover {
  background: var(--gold);
  color: var(--navy);
}

.open:active,
.live:active,
.word:active {
  transform: scale(0.97);
}

.open:focus-visible,
.live:focus-visible,
.word:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.colophon {
  display: flex;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.3rem 1.6rem;
  color: var(--mute);
  font-size: 0.8rem;
}

@keyframes write {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop {
  to {
    transform: scale(1);
  }
}

@keyframes slam {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bloom {
  to {
    opacity: 0.9;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes lamp {
  0%,
  100% {
    filter: drop-shadow(0 0 2px var(--gold));
  }
  50% {
    filter: drop-shadow(0 0 8px var(--gold));
  }
}

@keyframes lamp-warm {
  0%,
  100% {
    filter: drop-shadow(0 0 2px var(--saffron));
  }
  50% {
    filter: drop-shadow(0 0 8px var(--saffron));
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes unfurl {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spark {
  0% {
    opacity: 0;
    stroke-dashoffset: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
    stroke-dashoffset: -1;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-48%) scale(1.06);
  }
}

@media (max-width: 800px) {
  html[lang='fa'] h1 {
    font-size: clamp(2.15rem, 11.5vw, 3rem);
  }

  h1 {
    font-size: clamp(1.85rem, 7vw, 2.4rem);
  }

  .work {
    grid-template-columns: 1fr;
    grid-template-areas:
      "mark"
      "head"
      "lead"
      "facts"
      "foot";
    width: min(1180px, calc(100% - 1.4rem));
    padding: 1.35rem 1.1rem 1.25rem;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    gap: 1.8rem;
    padding-top: 1.6rem;
  }

  .sat,
  .plaque {
    width: 132px;
  }

  .sat {
    flex-basis: 132px;
  }

  .plaque img,
  .plaque svg {
    width: 56px;
    height: 56px;
  }

  .top {
    gap: 0.8rem;
  }

  .live {
    font-size: 0.75rem;
  }

  .top {
    align-items: flex-start;
  }

  .open {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .logo .ink {
    stroke-dashoffset: 0;
  }

  .logo .spark {
    display: none;
  }

  .logo .gold {
    transform: none;
  }

  .bloom {
    opacity: 0.7;
  }

  .pointer {
    display: none;
  }
}
