* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #070707;
  color: #fff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 7, 7, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  z-index: 1000;
}

.brand img {
  height: 38px;
  display: block;
}

.nav {
  display: flex;
  gap: 24px;
  color: #d7d7d7;
  font-size: 14px;
}

.nav a {
  transition: .25s;
}

.nav a:hover {
  color: #ffc400;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: #ffc400;
  font-size: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb400, #ffd35a);
  color: #121212;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 190, 0, .25);
  transition: .25s;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 45px rgba(255, 196, 0, .45);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.btn.outline {
  background: rgba(255,255,255,.06);
  color: #ffc400;
  border: 1px solid rgba(255,196,0,.35);
}

.hero {
  min-height: 100vh;
  padding: 130px 7% 70px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 50px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  background: #ffc400;
  animation: pulse 6s infinite alternate;
}

.glow.one {
  top: 80px;
  right: 5%;
}

.glow.two {
  left: -150px;
  bottom: 80px;
}

@keyframes pulse {
  from { transform: scale(.9); opacity: .18; }
  to { transform: scale(1.15); opacity: .34; }
}

.badge {
  display: inline-flex;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 196, 0, .12);
  color: #ffc400;
  border: 1px solid rgba(255,196,0,.25);
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .95;
  letter-spacing: -3px;
}

.hero p {
  max-width: 640px;
  font-size: 20px;
  line-height: 1.6;
  color: #c9c9c9;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}

.stats div {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
}

.stats b {
  display: block;
  color: #ffc400;
  font-size: 26px;
}

.stats span {
  color: #aaa;
  font-size: 13px;
}

.hero-card {
  height: 540px;
  border-radius: 44px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255,196,0,.28), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 60px rgba(255,255,255,.04), 0 30px 80px rgba(0,0,0,.5);
  position: relative;
  overflow: hidden;
}

.printer {
  position: absolute;
  width: 330px;
  height: 260px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -45%);
}

.paper {
  width: 180px;
  height: 210px;
  background: #fff;
  border-radius: 16px;
  margin: 0 auto;
  animation: paper 3s infinite ease-in-out;
}

.machine {
  position: absolute;
  bottom: 35px;
  width: 330px;
  height: 150px;
  background: linear-gradient(135deg, #242424, #111);
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 25px 60px rgba(0,0,0,.45);
}

.screen {
  position: absolute;
  right: 36px;
  bottom: 92px;
  width: 74px;
  height: 42px;
  border-radius: 12px;
  background: #ffc400;
}

@keyframes paper {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(22px); }
}

.float-card {
  position: absolute;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,196,0,.25);
  color: #ffc400;
  font-weight: 800;
  backdrop-filter: blur(14px);
  animation: float 4s infinite ease-in-out;
}

.f1 { top: 90px; left: 44px; }
.f2 { right: 50px; top: 170px; animation-delay: .8s; }
.f3 { left: 90px; bottom: 80px; animation-delay: 1.4s; }

@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.section {
  padding: 85px 7%;
  position: relative;
}

.dark-line {
  background: linear-gradient(180deg, #0b0b0b, #111);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.section-head {
  margin-bottom: 34px;
}

.section-head span {
  color: #ffc400;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -2px;
}

.cards {
  display: grid;
  gap: 22px;
}

.cards.three {
  grid-template-columns: repeat(3, 1fr);
}

.cards.two {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.service,
.wide-block,
.design-box,
.order-form,
.contacts {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(0,0,0,.28);
}

.card {
  min-height: 190px;
  transition: .25s;
}

.card:hover,
.service:hover {
  transform: translateY(-7px);
  border-color: rgba(255,196,0,.35);
}

.card h3,
.service h3 {
  margin-top: 0;
  font-size: 24px;
}

.card p,
.service li,
.design-box p,
.wide-block p,
.contacts p {
  color: #c5c5c5;
  line-height: 1.55;
}

.card strong {
  display: block;
  font-size: 54px;
  color: #ffc400;
}

.card.accent {
  background: linear-gradient(145deg, rgba(255,196,0,.22), rgba(255,255,255,.05));
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255,196,0,.13);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.service ul,
.design-box ul {
  padding-left: 18px;
}

.wide-block {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
  align-items: center;
}

.price-list {
  display: grid;
  gap: 12px;
  margin-top: 25px;
}

.price-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.price-list b {
  color: #ffc400;
}

.big-print {
  height: 270px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,196,0,.45), transparent),
    linear-gradient(145deg, #252525, #101010);
  position: relative;
}

.big-print:before {
  content: "";
  position: absolute;
  width: 190px;
  height: 120px;
  background: #fff;
  left: 80px;
  top: 70px;
  border-radius: 18px;
  transform: rotate(-8deg);
}

.design-box {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.order-form {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

input,
select,
textarea {
  width: 100%;
  padding: 17px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: #fff;
  outline: none;
  font-size: 15px;
}

select option {
  background: #111;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #ffc400;
}

.contacts {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 22px;
}

.socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.map {
  min-height: 300px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,196,0,.18), transparent),
    repeating-linear-gradient(45deg, #181818 0 12px, #111 12px 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffc400;
  font-size: 34px;
  font-weight: 900;
}

.footer {
  padding: 30px 7%;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #aaa;
}

.footer img {
  height: 32px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: .8s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 16px 22px;
  border-radius: 18px;
  background: #ffc400;
  color: #111;
  font-weight: 900;
  transform: translateY(120px);
  opacity: 0;
  transition: .35s;
  z-index: 9999;
}

.toast.show {
  transform: none;
  opacity: 1;
}

@media (max-width: 900px) {
  .header {
    padding: 0 18px;
  }

  .header .btn.small {
    display: none;
  }

  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 74px;
    left: 0;
    width: 100%;
    padding: 22px;
    background: rgba(7,7,7,.95);
    backdrop-filter: blur(18px);
    flex-direction: column;
    transform: translateY(-130%);
    transition: .3s;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .nav.open {
    transform: translateY(0);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 110px;
  }

  .hero-card {
    height: 420px;
  }

  .stats,
  .cards.three,
  .cards.two,
  .service-grid,
  .wide-block,
  .design-box,
  .contacts {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .wide-block {
    gap: 20px;
  }

  .big-print {
    height: 220px;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 65px 18px;
  }

  .hero {
    padding: 105px 18px 55px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .hero-card {
    border-radius: 28px;
  }

  .float-card {
    font-size: 12px;
  }

  .f1 { left: 18px; top: 52px; }
  .f2 { right: 18px; top: 120px; }
  .f3 { left: 30px; bottom: 52px; }

  .printer {
    transform: translate(-50%, -42%) scale(.78);
  }
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.social-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* contacts fix */
.contacts {
  grid-template-columns: 1fr !important;
}

.map {
  display: none !important;
}

.social-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.poly-animation {
  position: relative;
  height: 310px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,196,0,.28), transparent 34%),
    linear-gradient(145deg, #242424, #0d0d0d);
  overflow: hidden;
  border: 1px solid rgba(255,196,0,.25);
  box-shadow: inset 0 0 45px rgba(255,196,0,.08);
}

.paper-size {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 145px;
  height: 205px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #eaeaea);
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: paperMeasure 3.2s ease-in-out infinite;
  box-shadow: 0 20px 45px rgba(0,0,0,.45);
}

.paper-size span {
  font-size: 42px;
  font-weight: 900;
}

.paper-size small {
  font-size: 13px;
  font-weight: 800;
  opacity: .65;
}

@keyframes paperMeasure {
  0%, 100% {
    width: 130px;
    height: 185px;
    transform: translate(-50%, -50%) rotate(-3deg);
  }
  50% {
    width: 175px;
    height: 245px;
    transform: translate(-50%, -50%) rotate(3deg);
  }
}

.ruler {
  position: absolute;
  background: #ffc400;
  box-shadow: 0 0 25px rgba(255,196,0,.35);
}

.ruler-top {
  left: 35px;
  top: 35px;
  width: calc(100% - 70px);
  height: 28px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 16px),
    linear-gradient(135deg, #ffb400, #ffd95f);
}

.ruler-left {
  left: 35px;
  top: 35px;
  width: 28px;
  height: calc(100% - 70px);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, #111 0 2px, transparent 2px 16px),
    linear-gradient(135deg, #ffb400, #ffd95f);
}

.measure-line {
  position: absolute;
  background: rgba(255,196,0,.85);
  box-shadow: 0 0 18px rgba(255,196,0,.55);
  animation: measurePulse 3.2s ease-in-out infinite;
}

.measure-line.horizontal {
  left: 50%;
  top: 78%;
  height: 2px;
  width: 150px;
  transform: translateX(-50%);
}

.measure-line.vertical {
  left: 78%;
  top: 50%;
  width: 2px;
  height: 205px;
  transform: translateY(-50%);
}

@keyframes measurePulse {
  0%, 100% {
    opacity: .45;
    filter: blur(.2px);
  }
  50% {
    opacity: 1;
    filter: blur(0);
  }
}

@media (max-width: 520px) {
  .poly-animation {
    height: 260px;
  }

  .paper-size span {
    font-size: 34px;
  }
}

/* new paper format -> airplane animation */
.poly-animation {
  position: relative;
  height: 340px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,196,0,.28), transparent 34%),
    linear-gradient(145deg, #242424, #0d0d0d);
  overflow: hidden;
  border: 1px solid rgba(255,196,0,.25);
}

.paper-size {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 150px;
  height: 210px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #e9e9e9);
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: paperFlyCycle 8s ease-in-out infinite;
  box-shadow: 0 22px 50px rgba(0,0,0,.45);
}

.paper-size span {
  font-size: 42px;
  font-weight: 900;
  animation: formatName 8s infinite;
}

.paper-size small {
  font-size: 13px;
  font-weight: 800;
  opacity: .65;
  animation: formatSize 8s infinite;
}

.paper-size::before,
.paper-size::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #fff, #dcdcdc);
  opacity: 0;
  clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
  transition: .3s;
}

.paper-size::before {
  animation: wingOne 8s infinite;
}

.paper-size::after {
  animation: wingTwo 8s infinite;
}

@keyframes paperFlyCycle {
  0% {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    transform: translate(-50%, -50%) rotate(-3deg) scale(1);
    clip-path: inset(0);
  }

  18% {
    width: 150px;
    height: 210px;
    border-radius: 14px;
    transform: translate(-50%, -50%) rotate(2deg) scale(1);
    clip-path: inset(0);
  }

  36% {
    width: 190px;
    height: 135px;
    border-radius: 14px;
    transform: translate(-50%, -50%) rotate(-2deg) scale(1);
    clip-path: inset(0);
  }

  52% {
    width: 170px;
    height: 170px;
    border-radius: 14px;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    clip-path: inset(0);
  }

  64% {
    width: 210px;
    height: 95px;
    border-radius: 6px;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    clip-path: polygon(0 45%, 100% 0, 78% 50%, 100% 100%, 0 55%);
  }

  78% {
    width: 210px;
    height: 95px;
    border-radius: 6px;
    transform: translate(160%, -170%) rotate(-18deg) scale(.9);
    clip-path: polygon(0 45%, 100% 0, 78% 50%, 100% 100%, 0 55%);
    opacity: 1;
  }

  86% {
    transform: translate(-230%, 80%) rotate(160deg) scale(.75);
    opacity: 0;
  }

  94% {
    width: 210px;
    height: 95px;
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    clip-path: polygon(0 45%, 100% 0, 78% 50%, 100% 100%, 0 55%);
    opacity: 1;
  }

  100% {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    transform: translate(-50%, -50%) rotate(-3deg) scale(1);
    clip-path: inset(0);
  }
}

@keyframes formatName {
  0%, 17% { content: "A5"; }
  0%, 17% { opacity: 1; }
  18%, 35% { opacity: 1; }
  36%, 51% { opacity: 1; }
  52%, 61% { opacity: 1; }
  62%, 100% { opacity: 0; }
}

@keyframes formatSize {
  0%, 17% { opacity: .65; }
  18%, 35% { opacity: .65; }
  36%, 51% { opacity: .65; }
  52%, 61% { opacity: .65; }
  62%, 100% { opacity: 0; }
}

@keyframes wingOne {
  0%, 60% { opacity: 0; transform: scaleX(1); }
  64%, 94% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; }
}

@keyframes wingTwo {
  0%, 60% { opacity: 0; transform: scaleY(-1); }
  64%, 94% { opacity: .75; transform: scaleY(-1); }
  100% { opacity: 0; }
}

.paper-size span::after {
  content: "";
  animation: formatText 8s infinite;
}

.paper-size span {
  font-size: 0;
}

.paper-size small {
  font-size: 0;
}

.paper-size small::after {
  content: "";
  font-size: 13px;
  animation: formatSubText 8s infinite;
}

.paper-size span::after {
  font-size: 42px;
}

@keyframes formatText {
  0%, 17% { content: "A5"; }
  18%, 35% { content: "A4"; }
  36%, 51% { content: "A3"; }
  52%, 61% { content: "A2"; }
  62%, 100% { content: ""; }
}

@keyframes formatSubText {
  0%, 17% { content: "148 × 210 мм"; }
  18%, 35% { content: "210 × 297 мм"; }
  36%, 51% { content: "297 × 420 мм"; }
  52%, 61% { content: "420 × 594 мм"; }
  62%, 100% { content: ""; }
}

.measure-line {
  animation: measurePulse 8s ease-in-out infinite;
}

@keyframes measurePulse {
  0%, 58% { opacity: .8; }
  64%, 100% { opacity: 0; }
}

@media (max-width: 520px) {
  .poly-animation {
    height: 290px;
  }

  .paper-size span::after {
    font-size: 34px;
  }
}

/* remove rulers completely */
.ruler,
.measure-line,
.ruler-top,
.ruler-left,
.horizontal,
.vertical {
  display: none !important;
}

/* natural fold + airplane animation */
.paper-size {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 160px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #ececec);
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  overflow: visible;
  animation: smoothPaperCycle 10s ease-in-out infinite;
}

/* fold lines */
.paper-size::before,
.paper-size::after {
  content: "";
  position: absolute;
  background: rgba(0,0,0,.08);
  opacity: 0;
  transition: .3s;
}

/* center fold */
.paper-size::before {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  animation: foldCenter 10s infinite;
}

/* diagonal fold */
.paper-size::after {
  width: 120%;
  height: 2px;
  left: -10%;
  top: 50%;
  transform: rotate(-28deg);
  animation: foldDiagonal 10s infinite;
}

@keyframes foldCenter {
  0%, 58% { opacity: 0; }
  62%, 72% { opacity: 1; }
  73%, 100% { opacity: 0; }
}

@keyframes foldDiagonal {
  0%, 60% { opacity: 0; }
  66%, 76% { opacity: 1; }
  77%, 100% { opacity: 0; }
}

@keyframes smoothPaperCycle {
  /* A5 */
  0% {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
    opacity: 1;
  }

  /* A4 */
  18% {
    width: 150px;
    height: 210px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  /* A3 */
  36% {
    width: 190px;
    height: 135px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-1deg);
  }

  /* pause before folding */
  52% {
    width: 170px;
    height: 170px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* first fold */
  64% {
    width: 170px;
    height: 150px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 85% 55%, 15% 55%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* second fold to airplane */
  74% {
    width: 210px;
    height: 90px;
    border-radius: 6px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 55%);
    transform: translate(-50%, -50%) rotate(-4deg);
  }

  /* smooth flight */
  84% {
    width: 210px;
    height: 90px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 55%);
    transform: translate(80%, -130%) rotate(-18deg);
    opacity: 1;
  }

  /* far away */
  90% {
    transform: translate(160%, -220%) rotate(-28deg) scale(.65);
    opacity: .35;
  }

  /* return */
  96% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    opacity: 1;
  }

  /* back to paper */
  100% {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
    opacity: 1;
  }
}

/* final poly animation fix */
.paper-size {
  animation: paperCircleFlight 7s ease-in-out infinite !important;
}

.paper-size span::after {
  animation: formatTextFast 7s infinite !important;
}

.paper-size small::after {
  animation: formatSubTextFast 7s infinite !important;
}

/* реальные пропорции A5/A4/A3/A2: 1 : 1.414 */
@keyframes paperCircleFlight {
  0% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
    opacity: 1;
  }

  15% {
    width: 145px;
    height: 205px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  30% {
    width: 190px;
    height: 269px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-1deg);
  }

  45% {
    width: 225px;
    height: 318px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* складывание */
  56% {
    width: 200px;
    height: 170px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  64% {
    width: 220px;
    height: 92px;
    border-radius: 7px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(-8deg);
  }

  /* самолёт облетает круг */
  72% {
    transform: translate(70%, -125%) rotate(-28deg) scale(.9);
  }

  80% {
    transform: translate(145%, -50%) rotate(25deg) scale(.85);
  }

  88% {
    transform: translate(65%, 55%) rotate(150deg) scale(.9);
  }

  95% {
    width: 220px;
    height: 92px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
    opacity: 1;
  }

  100% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

@keyframes formatTextFast {
  0%, 14% { content: "A5"; opacity: 1; }
  15%, 29% { content: "A4"; opacity: 1; }
  30%, 44% { content: "A3"; opacity: 1; }
  45%, 55% { content: "A2"; opacity: 1; }
  56%, 100% { content: ""; opacity: 0; }
}

@keyframes formatSubTextFast {
  0%, 14% { content: "148 × 210 мм"; opacity: .65; }
  15%, 29% { content: "210 × 297 мм"; opacity: .65; }
  30%, 44% { content: "297 × 420 мм"; opacity: .65; }
  45%, 55% { content: "420 × 594 мм"; opacity: .65; }
  56%, 100% { content: ""; opacity: 0; }
}

@media (max-width: 520px) {
  @keyframes paperCircleFlight {
    0% { width: 82px; height: 116px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(-2deg); }
    15% { width: 104px; height: 147px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(1deg); }
    30% { width: 130px; height: 184px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(-1deg); }
    45% { width: 155px; height: 219px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(0); }
    56% { width: 145px; height: 125px; clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%); transform: translate(-50%, -50%) rotate(0); }
    64% { width: 165px; height: 70px; clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%); transform: translate(-50%, -50%) rotate(-8deg); }
    72% { transform: translate(55%, -120%) rotate(-28deg) scale(.9); }
    80% { transform: translate(105%, -50%) rotate(25deg) scale(.85); }
    88% { transform: translate(55%, 50%) rotate(150deg) scale(.9); }
    95% { width: 165px; height: 70px; clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%); transform: translate(-50%, -50%) rotate(360deg) scale(1); }
    100% { width: 82px; height: 116px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(-2deg); }
  }
}

/* replace A4 with poster + add business card erase step */
.paper-size span::after {
  animation: formatTextPosterCard 9s infinite !important;
}

.paper-size small::after {
  animation: formatSubTextPosterCard 9s infinite !important;
}

.paper-size {
  animation: paperPosterCardFlight 9s ease-in-out infinite !important;
}

.paper-size .card-info {
  display: none;
}

.paper-size::before {
  content: "FORMA\A Copycenter\A +7 995 623-71-12";
  white-space: pre;
  position: absolute;
  inset: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #111;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  background: transparent;
  animation: businessCardInfo 9s infinite !important;
}

.paper-size::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6f6f6, #bdbdbd);
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  opacity: 0;
  animation: eraserMove 9s infinite !important;
}

@keyframes paperPosterCardFlight {
  0% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }

  14% {
    width: 145px;
    height: 205px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  28% {
    width: 235px;
    height: 332px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-1deg);
  }

  /* визитка */
  42% {
    width: 245px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  55% {
    width: 245px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* складывание */
  66% {
    width: 200px;
    height: 170px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  74% {
    width: 220px;
    height: 92px;
    border-radius: 7px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(-8deg);
  }

  81% {
    transform: translate(70%, -125%) rotate(-28deg) scale(.9);
  }

  87% {
    transform: translate(145%, -50%) rotate(25deg) scale(.85);
  }

  93% {
    transform: translate(65%, 55%) rotate(150deg) scale(.9);
  }

  97% {
    width: 220px;
    height: 92px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }

  100% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

@keyframes formatTextPosterCard {
  0%, 13% { content: "A5"; opacity: 1; }
  14%, 27% { content: "A4"; opacity: 1; }
  28%, 41% { content: "Плакат"; opacity: 1; }
  42%, 65% { content: ""; opacity: 0; }
  66%, 100% { content: ""; opacity: 0; }
}

@keyframes formatSubTextPosterCard {
  0%, 13% { content: "148 × 210 мм"; opacity: .65; }
  14%, 27% { content: "210 × 297 мм"; opacity: .65; }
  28%, 41% { content: "A2 / A1"; opacity: .65; }
  42%, 100% { content: ""; opacity: 0; }
}

@keyframes businessCardInfo {
  0%, 41% {
    opacity: 0;
    filter: blur(0);
  }

  43%, 49% {
    opacity: 1;
    filter: blur(0);
  }

  50%, 55% {
    opacity: .45;
    filter: blur(1px);
  }

  56%, 100% {
    opacity: 0;
    filter: blur(4px);
  }
}

@keyframes eraserMove {
  0%, 47% {
    opacity: 0;
    transform: translate(-120px, -45px) rotate(-18deg);
  }

  50% {
    opacity: 1;
    transform: translate(70px, -25px) rotate(-18deg);
  }

  54% {
    opacity: 1;
    transform: translate(-75px, 18px) rotate(-18deg);
  }

  58% {
    opacity: 0;
    transform: translate(90px, 45px) rotate(-18deg);
  }

  100% {
    opacity: 0;
  }
}

/* HARD RESET POLY ANIMATION */
.ruler,
.measure-line,
.ruler-top,
.ruler-left,
.paper-size {
  display: none !important;
}

.poly-animation {
  position: relative;
  height: 350px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255,196,0,.28), transparent 34%),
    linear-gradient(145deg, #242424, #0d0d0d);
  overflow: hidden;
  border: 1px solid rgba(255,196,0,.25);
}

.print-item {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 120px;
  height: 170px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #e8e8e8);
  color: #111;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  animation: printCycleNew 8.5s ease-in-out infinite;
  overflow: visible;
}

.format-title,
.format-subtitle {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  font-weight: 900;
  z-index: 5;
}

.format-title {
  top: 38%;
  font-size: 38px;
}

.format-subtitle {
  top: 60%;
  font-size: 13px;
  opacity: .65;
}

.format-title::after {
  content: "";
  animation: titleNew 8.5s infinite;
}

.format-subtitle::after {
  content: "";
  animation: subtitleNew 8.5s infinite;
}

.business-text {
  position: absolute;
  inset: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  opacity: 0;
  z-index: 6;
  animation: bizTextNew 8.5s infinite;
}

.business-text b {
  font-size: 28px;
}

.business-text span {
  font-size: 14px;
  font-weight: 800;
}

.business-text small {
  font-size: 12px;
  font-weight: 800;
}

.eraser {
  position: absolute;
  width: 64px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ffffff, #b7b7b7);
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  opacity: 0;
  z-index: 10;
  animation: eraserNew 8.5s infinite;
}

@keyframes printCycleNew {
  0% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }

  20% {
    width: 235px;
    height: 332px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  38% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  54% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  66% {
    width: 200px;
    height: 160px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  74% {
    width: 220px;
    height: 92px;
    border-radius: 7px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(-8deg);
  }

  82% {
    transform: translate(70%, -125%) rotate(-28deg) scale(.9);
  }

  89% {
    transform: translate(145%, -40%) rotate(30deg) scale(.85);
  }

  95% {
    transform: translate(55%, 62%) rotate(155deg) scale(.9);
  }

  98% {
    width: 220px;
    height: 92px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }

  100% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

@keyframes titleNew {
  0%, 19% { content: "A5"; opacity: 1; }
  20%, 37% { content: "Плакат"; opacity: 1; }
  38%, 100% { content: ""; opacity: 0; }
}

@keyframes subtitleNew {
  0%, 19% { content: "148 × 210 мм"; opacity: .65; }
  20%, 37% { content: "A2 / A1"; opacity: .65; }
  38%, 100% { content: ""; opacity: 0; }
}

@keyframes bizTextNew {
  0%, 39% { opacity: 0; }
  40%, 48% { opacity: 1; transform: translateX(0); }
  52% { opacity: .55; transform: translateX(18px); }
  56%, 100% { opacity: 0; transform: translateX(70px); }
}

@keyframes eraserNew {
  0%, 45% {
    opacity: 0;
    transform: translate(35px, 20px) rotate(-18deg);
  }

  48% {
    opacity: 1;
    transform: translate(165px, 25px) rotate(-18deg);
  }

  52% {
    opacity: 1;
    transform: translate(35px, 65px) rotate(-18deg);
  }

  56% {
    opacity: 0;
    transform: translate(170px, 98px) rotate(-18deg);
  }

  100% {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .poly-animation {
    height: 300px;
  }

  @keyframes printCycleNew {
    0% { width: 82px; height: 116px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(-2deg); }
    20% { width: 155px; height: 219px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(1deg); }
    38% { width: 210px; height: 118px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(0); }
    54% { width: 210px; height: 118px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(0); }
    66% { width: 150px; height: 125px; clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%); transform: translate(-50%, -50%) rotate(0); }
    74% { width: 165px; height: 70px; clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%); transform: translate(-50%, -50%) rotate(-8deg); }
    82% { transform: translate(55%, -120%) rotate(-28deg) scale(.9); }
    89% { transform: translate(105%, -40%) rotate(30deg) scale(.85); }
    95% { transform: translate(55%, 52%) rotate(155deg) scale(.9); }
    98% { width: 165px; height: 70px; clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%); transform: translate(-50%, -50%) rotate(360deg) scale(1); }
    100% { width: 82px; height: 116px; clip-path: inset(0); transform: translate(-50%, -50%) rotate(-2deg); }
  }
}

/* FULL FIELD AIRPLANE FLIGHT */
.print-item {
  animation: printCycleFullField 9s ease-in-out infinite !important;
}

@keyframes printCycleFullField {
  /* A5 */
  0% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }

  /* Плакат */
  18% {
    width: 235px;
    height: 332px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  /* Визитка */
  34% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  50% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* Складывание */
  61% {
    width: 200px;
    height: 160px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  /* Самолёт */
  68% {
    width: 170px;
    height: 72px;
    border-radius: 7px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  /* Верхний правый угол */
  74% {
    transform: translate(95%, -195%) rotate(-25deg) scale(.85);
  }

  /* Правый край */
  79% {
    transform: translate(165%, -35%) rotate(55deg) scale(.8);
  }

  /* Нижний край */
  84% {
    transform: translate(60%, 170%) rotate(135deg) scale(.85);
  }

  /* Левый нижний */
  89% {
    transform: translate(-170%, 120%) rotate(205deg) scale(.78);
  }

  /* Левый верхний */
  94% {
    transform: translate(-155%, -170%) rotate(300deg) scale(.82);
  }

  /* Возвращение в центр */
  98% {
    width: 170px;
    height: 72px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }

  /* Снова лист */
  100% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

@media (max-width: 520px) {
  @keyframes printCycleFullField {
    0% {
      width: 82px;
      height: 116px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(-2deg);
    }

    18% {
      width: 155px;
      height: 219px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(1deg);
    }

    34% {
      width: 210px;
      height: 118px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
      width: 210px;
      height: 118px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(0deg);
    }

    61% {
      width: 150px;
      height: 125px;
      clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
      transform: translate(-50%, -50%) rotate(0deg);
    }

    68% {
      width: 165px;
      height: 70px;
      clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
      transform: translate(-50%, -50%) rotate(-8deg);
    }

    74% {
      transform: translate(70%, -150%) rotate(-25deg) scale(.9);
    }

    79% {
      transform: translate(120%, -25%) rotate(55deg) scale(.85);
    }

    84% {
      transform: translate(50%, 135%) rotate(135deg) scale(.9);
    }

    89% {
      transform: translate(-130%, 90%) rotate(205deg) scale(.85);
    }

    94% {
      transform: translate(-120%, -140%) rotate(300deg) scale(.88);
    }

    98% {
      width: 165px;
      height: 70px;
      clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
      transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }

    100% {
      width: 82px;
      height: 116px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(-2deg);
    }
  }
}

/* FIX: text overlap + slower airplane */
.print-item {
  animation: printCycleFullFieldSlow 14s ease-in-out infinite !important;
}

.format-title,
.format-subtitle,
.business-text {
  pointer-events: none;
}

.format-title::after,
.format-subtitle::after {
  display: block;
  line-height: 1;
}

.format-title {
  top: 36% !important;
  font-size: 34px !important;
  z-index: 20;
}

.format-subtitle {
  top: 56% !important;
  font-size: 13px !important;
  z-index: 20;
}

.business-text {
  z-index: 30;
}

/* скрываем названия форматов во время визитки, стирания, складывания и полёта */
.format-title,
.format-subtitle {
  animation: hideFormatDuringCard 14s infinite !important;
}

@keyframes hideFormatDuringCard {
  0%, 34% { opacity: 1; }
  35%, 100% { opacity: 0; }
}

.format-title::after {
  animation: titleSlow 14s infinite !important;
}

.format-subtitle::after {
  animation: subtitleSlow 14s infinite !important;
}

.business-text {
  animation: bizTextSlow 14s infinite !important;
}

.eraser {
  animation: eraserSlow 14s infinite !important;
}

@keyframes titleSlow {
  0%, 16% { content: "A5"; }
  17%, 34% { content: "Плакат"; }
  35%, 100% { content: ""; }
}

@keyframes subtitleSlow {
  0%, 16% { content: "148 × 210 мм"; }
  17%, 34% { content: "A2 / A1"; }
  35%, 100% { content: ""; }
}

@keyframes bizTextSlow {
  0%, 36% {
    opacity: 0;
    transform: translateX(0);
  }

  37%, 49% {
    opacity: 1;
    transform: translateX(0);
  }

  54% {
    opacity: .45;
    transform: translateX(30px);
  }

  58%, 100% {
    opacity: 0;
    transform: translateX(85px);
  }
}

@keyframes eraserSlow {
  0%, 48% {
    opacity: 0;
    transform: translate(35px, 20px) rotate(-18deg);
  }

  51% {
    opacity: 1;
    transform: translate(165px, 25px) rotate(-18deg);
  }

  55% {
    opacity: 1;
    transform: translate(35px, 65px) rotate(-18deg);
  }

  59% {
    opacity: 0;
    transform: translate(170px, 98px) rotate(-18deg);
  }

  100% {
    opacity: 0;
  }
}

@keyframes printCycleFullFieldSlow {
  0% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }

  17% {
    width: 235px;
    height: 332px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(1deg);
  }

  35% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  52% {
    width: 250px;
    height: 140px;
    border-radius: 18px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  62% {
    width: 200px;
    height: 160px;
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
    transform: translate(-50%, -50%) rotate(0deg);
  }

  70% {
    width: 170px;
    height: 72px;
    border-radius: 7px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  76% {
    transform: translate(95%, -195%) rotate(-25deg) scale(.85);
  }

  82% {
    transform: translate(165%, -35%) rotate(55deg) scale(.8);
  }

  88% {
    transform: translate(60%, 170%) rotate(135deg) scale(.85);
  }

  93% {
    transform: translate(-170%, 120%) rotate(205deg) scale(.78);
  }

  97% {
    transform: translate(-155%, -170%) rotate(300deg) scale(.82);
  }

  99% {
    width: 170px;
    height: 72px;
    clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }

  100% {
    width: 115px;
    height: 163px;
    border-radius: 14px;
    clip-path: inset(0);
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

/* PHONE SIZE FIX FOR POLY ANIMATION */
@media (max-width: 520px) {
  .poly-animation {
    height: 300px !important;
    max-height: 300px !important;
    overflow: hidden !important;
  }

  @keyframes formaPolyClean {
    0%, 13% {
      width: 70px;
      height: 99px;
      border-radius: 10px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(-2deg);
    }

    20%, 32% {
      width: 115px;
      height: 163px;
      border-radius: 12px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(1deg);
    }

    39%, 54% {
      width: 180px;
      height: 100px;
      border-radius: 16px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(0deg);
    }

    63% {
      width: 130px;
      height: 108px;
      border-radius: 10px;
      clip-path: polygon(0 0, 100% 0, 82% 58%, 18% 58%);
      transform: translate(-50%, -50%) rotate(0deg);
    }

    70% {
      width: 120px;
      height: 50px;
      border-radius: 7px;
      clip-path: polygon(0 50%, 100% 0, 78% 50%, 100% 100%, 0 56%);
      transform: translate(-50%, -50%) rotate(-10deg);
    }

    76% { transform: translate(70%, -120%) rotate(-25deg) scale(.8); }
    82% { transform: translate(95%, -20%) rotate(60deg) scale(.78); }
    88% { transform: translate(35%, 100%) rotate(135deg) scale(.8); }
    94% { transform: translate(-95%, 70%) rotate(220deg) scale(.76); }
    98% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }

    100% {
      width: 70px;
      height: 99px;
      border-radius: 10px;
      clip-path: inset(0);
      transform: translate(-50%, -50%) rotate(-2deg);
    }
  }
}

.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.upload-overlay.show {
  display: flex;
}

.upload-box {
  width: min(420px, calc(100% - 36px));
  padding: 34px;
  border-radius: 30px;
  background: rgba(20,20,20,.92);
  border: 1px solid rgba(255,196,0,.35);
  box-shadow: 0 0 70px rgba(255,196,0,.18);
  text-align: center;
}

.upload-title {
  color: #ffc400;
  font-weight: 900;
  font-size: 24px;
  margin-bottom: 18px;
}

.upload-percent {
  font-size: 54px;
  font-weight: 900;
  margin-bottom: 18px;
}

.upload-bar {
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}

.upload-bar div {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb400, #ffe27a);
  box-shadow: 0 0 30px rgba(255,196,0,.6);
  transition: width .25s;
}

.upload-text {
  margin-top: 16px;
  color: #cfcfcf;
}

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99998;
}
.auth-modal.show { display: flex; }
.auth-box {
  width: min(420px, calc(100% - 32px));
  background: #151515;
  border: 1px solid rgba(255,196,0,.35);
  border-radius: 30px;
  padding: 30px;
}
.auth-box input { margin-bottom: 12px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#authError { color: #ffc400; font-weight: 800; }
.profile-menu {
  position: fixed;
  right: 18px;
  top: 82px;
  background: #151515;
  border: 1px solid rgba(255,196,0,.35);
  border-radius: 20px;
  padding: 14px;
  z-index: 9999;
  display: none;
}
.profile-menu.show { display: block; }
.profile-menu a,.profile-menu button {
  display: block;
  width: 100%;
  margin: 8px 0;
}
