/* ReStar landing: "Готовые решения" — demo sites for different niches. The first one is live (hookah lounge):
   a phone with an iridescent frame scrolls through the real menu page. */

.restar-clients-record {
  position: relative;
  z-index: 1;
  background: #050505 !important;
  /* everything that moves inside stays inside: the 3D phones never force the rest of the page into extra layers */
  isolation: isolate;
  contain: layout paint;
}

.restar-demos,
.restar-demos * {
  box-sizing: border-box;
}

.restar-demos {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 6vw, 110px) 0 clamp(64px, 6vw, 104px);
  color: #fff;
  background:
    radial-gradient(ellipse 55% 40% at 72% 42%, rgba(246, 195, 163, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 0%, rgba(255, 107, 0, 0.07), transparent 70%),
    #050505;
  font-family: "ForrestSans", Arial, sans-serif;
}

.restar-demos::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

.restar-demos__shell {
  position: relative;
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}

.restar-demos__head {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.restar-demos__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 18px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 107, 0, 0.24);
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.08);
  color: #ff7a00;
  font: 600 14px/1.1 "ForrestSans", Arial, sans-serif;
}

.restar-demos__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b00;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.2);
}

.restar-demos h2 {
  margin: 0;
  color: #fff;
  font: 800 clamp(34px, 3.6vw, 60px)/1.02 "ForrestSans", Arial, sans-serif;
  text-wrap: balance;
}

.restar-demos h2 span,
.restar-demo-hero h3 span {
  background: linear-gradient(135deg, #ff6b00, #ffb15c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.restar-demos .restar-demos__lead {
  max-width: 600px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.66);
  font: 400 clamp(15px, 1vw, 18px)/1.45 "ForrestSans", Arial, sans-serif;
}

/* ---------- featured: hookah lounge ---------- */

.restar-demo-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(40px, 4vw, 64px);
  padding: clamp(28px, 3.4vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 36px;
  background:
    radial-gradient(ellipse 70% 80% at 85% 50%, rgba(246, 195, 163, 0.13), transparent 70%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
}

.restar-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 195, 163, 0.35);
  background: rgba(246, 195, 163, 0.1);
  color: #f6c3a3;
  font: 700 13px/1 "ForrestSans", Arial, sans-serif;
  letter-spacing: 0.02em;
}

.restar-demo-badge i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f6c3a3;
}

.restar-demo-badge i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #f6c3a3;
  animation: restar-demo-ping 2s ease-out infinite;
}

@keyframes restar-demo-ping {
  from { transform: scale(1); opacity: 0.6; }
  70%, to { transform: scale(3.5); opacity: 0; }
}

.restar-demo-hero h3 {
  margin: 20px 0 0;
  color: #fff;
  font: 800 clamp(30px, 3vw, 48px)/1.05 "ForrestSans", Arial, sans-serif;
}

.restar-demo-hero p {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font: 400 clamp(15px, 1.05vw, 18px)/1.5 "ForrestSans", Arial, sans-serif;
}

.restar-demo-hero .restar-demo-hero__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.restar-demo-hero__features li {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font: 500 14px/1.2 "ForrestSans", Arial, sans-serif;
}

.restar-demo-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.restar-demos .restar-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  font: 700 15px/1 "ForrestSans", Arial, sans-serif;
  text-decoration: none !important;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.restar-demos .restar-demo-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.restar-demos .restar-demo-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ff7a00, #ff5a00);
  box-shadow: 0 14px 34px rgba(255, 107, 0, 0.32);
}

.restar-demos .restar-demo-btn--primary:hover {
  box-shadow: 0 18px 42px rgba(255, 107, 0, 0.45);
}

/* ---------- 3D carousel of phones: the active one faces you, the neighbours turn away at the sides ---------- */

.restar-demo-hero__copy {
  transition: opacity 260ms ease, transform 260ms ease;
}

.restar-demo-hero__copy.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.restar-demo-stage {
  --pw: 320px;
  position: relative;
  min-width: 0;
  padding: 6px 0 46px;
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
  /* the neighbours fade out at the edges instead of being cut */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.restar-demo-stage.is-dragging {
  cursor: grabbing;
}

.restar-demo-stage__track {
  position: relative;
  width: var(--pw);
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  perspective: 1100px;
}

.restar-demo-phone {
  position: absolute;
  inset: 0;
  display: block;
  padding: 2px;
  border-radius: 41px;
  isolation: isolate;
  text-decoration: none !important;
  transform-origin: 50% 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* iridescent frame: a conic square turning under the rounded rim — a pure GPU transform, nothing is repainted */
.restar-demo-phone__rim {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #f6c3a3;
}

.restar-demo-phone__rim::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  aspect-ratio: 1;
  background: conic-gradient(#f6c3a3, #ff7a00, #ffd27a, #c08bff, #6fd6ff, #f6c3a3);
  transform: translate(-50%, -50%);
}

/* only the phone in front spins its rim: a standing rim is painted once with the phone, not kept as a big extra layer */
.restar-demo-phone.is-active .restar-demo-phone__rim::before {
  animation: restar-demo-spin 6s linear infinite;
}

@keyframes restar-demo-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* glow under the phone in front: a soft gradient, no blur filter */
.restar-demo-phone::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -4% -14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 122, 0, 0.3), rgba(246, 195, 163, 0.14) 55%, rgba(192, 139, 255, 0.06) 75%, transparent);
  opacity: 0;
  transition: opacity 400ms ease;
}

.restar-demo-phone.is-active::after {
  opacity: 1;
}

.restar-demo-phone__body {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px;
  border-radius: 39px;
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 0 0 3px #000;
}

/* home indicator */
.restar-demo-phone__body::after {
  content: "";
  position: absolute;
  z-index: 4;
  bottom: 13px;
  left: 50%;
  width: 34%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(-50%);
}

.restar-demo-phone__screen {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-top: 0;
  border-radius: 33px;
  background: #0e0e12;
  contain: paint;
}

/* soft fade at the bottom, so the cut cards read as a page that goes on */
.restar-demo-phone__screen::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(5, 5, 7, 0), rgba(5, 5, 7, 0.85));
  pointer-events: none;
}

/* light screenshots: no dark fade, a dark home indicator */
.restar-demo-phone__screen--shot {
  background: #f7f7f8;
}

.restar-demo-phone__screen--shot::after {
  display: none;
}

.restar-demo-phone__body:has(.restar-demo-phone__screen--shot)::after {
  background: rgba(0, 0, 0, 0.45);
}

/* the phones behind are dimmed */
.restar-demo-phone__body > .restar-demo-phone__screen::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  background: #050505;
  opacity: var(--dim, 0);
  pointer-events: none;
  will-change: opacity;
}

#allrecords .restar-demo-phone__poster {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: opacity 600ms ease;
}

.restar-demo-phone__frame {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  background: #030305;
  opacity: 0;
  transition: opacity 600ms ease;
}

.restar-demo-phone__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  transition: opacity 400ms ease;
}

.restar-demo-phone__screen.is-live .restar-demo-phone__video,
.restar-demo-phone__screen.is-live .restar-demo-phone__frame {
  opacity: 1;
}

.restar-demo-phone__screen.is-live .restar-demo-phone__poster {
  opacity: 0;
}

.restar-demo-phone__tag {
  position: absolute;
  z-index: 200;
  left: 50%;
  bottom: 22px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 13px/1 "ForrestSans", Arial, sans-serif;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  transition: border-color 220ms ease, opacity 220ms ease;
}

.restar-demo-stage:hover .restar-demo-phone__tag {
  border-color: rgba(246, 195, 163, 0.6);
}

.restar-demo-stage.is-dragging .restar-demo-phone__tag {
  opacity: 0;
}

.restar-demos .restar-demo-btn--soon {
  cursor: default;
  color: rgba(255, 255, 255, 0.6) !important;
  border-style: dashed;
}

.restar-demos .restar-demo-btn--soon:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 860px) {
  .restar-demo-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 20px 44px;
    border-radius: 28px;
  }

  .restar-demo-hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .restar-demo-hero__actions {
    justify-content: center;
  }

  /* four features as a neat 2 × 2 grid instead of a pyramid */
  .restar-demo-hero .restar-demo-hero__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .restar-demo-hero__features li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 4px;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: -0.01em;
  }

  .restar-demo-hero__actions .restar-demo-btn {
    width: 100%;
  }

  /* the stage goes edge to edge of the card; the side phones lie on top of the card's frame
     and run on to the screen edge, no fade */
  .restar-demo-stage {
    --pw: min(68vw, 300px);
    order: -1;
    margin: -6px -20px 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .restar-demo-phone.is-active .restar-demo-phone__rim::before,
  .restar-demo-badge i::after {
    animation: none;
  }
}
