/* Hero illustration — floating UI scene */
.hero-mark {
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 520px;
}

.scene {
  position: relative;
  width: 100%;
  height: 540px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(17,17,17,0.11) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ─── KEYFRAMES ─── */
@keyframes floatA {
  0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
  50%       { transform: translate(-50%, -50%) translateY(-15px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(-8px) rotate(-0.3deg); }
  50%       { transform: translateY(9px) rotate(0.3deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(5px) translateX(2px); }
  38%       { transform: translateY(-12px) translateX(-3px); }
  72%       { transform: translateY(4px) translateX(4px); }
}
@keyframes floatD {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  32%       { transform: translateY(-14px) rotate(-0.4deg); }
  68%       { transform: translateY(6px) rotate(0.2deg); }
}
@keyframes barPulse {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(0.42); }
}
@keyframes toggleSlide {
  0%, 38%   { transform: translateX(0px); }
  58%, 100% { transform: translateX(18px); }
}
@keyframes toggleBg {
  0%, 38%   { background: #CFCCC6; }
  58%, 100% { background: #111111; }
}
@keyframes cursorMove {
  0%         { transform: translate(0, 0); }
  22%        { transform: translate(14px, 20px); }
  36%        { transform: translate(14px, 20px) scale(0.86); }
  46%        { transform: translate(14px, 20px) scale(1); }
  76%        { transform: translate(-8px, -10px); }
  100%       { transform: translate(0, 0); }
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.55; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.25; transform: scale(0.65); }
}
@keyframes phoneScroll {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}

/* ─── PHONE ─── */
.phone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160px;
  height: 335px;
  background: #111111;
  border-radius: 40px;
  box-shadow:
    0 32px 72px rgba(0,0,0,0.28),
    0  0   0  1px rgba(255,255,255,0.07),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  animation: floatA 5.4s ease-in-out infinite;
  z-index: 10;
}
.phone-screen {
  position: absolute;
  top: 12px; left: 7px; right: 7px; bottom: 12px;
  background: #F5F2EC;
  border-radius: 32px;
  overflow: hidden;
}
.phone-pill {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 12px;
  background: #111111;
  border-radius: 6px;
  z-index: 2;
}
.phone-content {
  position: absolute;
  inset: 0;
  padding-top: 28px;
  animation: phoneScroll 9s ease-in-out infinite;
}
.ph-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 4px;
}
.ph-dot {
  width: 5px; height: 5px;
  background: #111;
  border-radius: 50%;
}
.ph-dot:nth-child(1) { animation: dotPulse 2.2s ease-in-out infinite 0s; }
.ph-dot:nth-child(2) { animation: dotPulse 2.2s ease-in-out infinite -.73s; }
.ph-dot:nth-child(3) { animation: dotPulse 2.2s ease-in-out infinite -1.46s; }
.ph-card {
  margin: 5px 7px;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 9px;
}
.ph-line {
  height: 5px; border-radius: 3px;
  background: #E0DDD7; margin-bottom: 5px;
}
.ph-line.ink  { background: #111; width: 50%; }
.ph-line.short { width: 62%; }
.ph-stat { font-size: 15px; font-weight: 700; color: #111; margin: 2px 0 4px; }
.ph-bars {
  display: flex; align-items: flex-end;
  gap: 3px; height: 28px; margin-top: 4px;
}
.ph-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: #111;
  transform-origin: center bottom;
  animation: barPulse 3.3s ease-in-out infinite;
}
.ph-bar:nth-child(2) { background: #CFCCC6; animation-delay: -.6s; }
.ph-bar:nth-child(3) { animation-delay: -1.1s; }
.ph-bar:nth-child(4) { background: #CFCCC6; animation-delay: -1.7s; }
.ph-bar:nth-child(5) { animation-delay: -2.3s; }
.ph-row {
  display: flex; align-items: center;
  gap: 6px; margin-bottom: 6px;
}
.ph-avatar {
  width: 18px; height: 18px;
  border-radius: 50%; background: #111; flex-shrink: 0;
}
.ph-row-lines { flex: 1; }
.ph-rline {
  height: 4px; border-radius: 2px;
  background: #E0DDD7; margin-bottom: 4px;
}
.ph-rline.short { width: 55%; margin-bottom: 0; }

/* ─── CARDS ─── */
.card {
  position: absolute;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 38px rgba(17,17,17,0.10), 0 2px 8px rgba(17,17,17,0.06);
  z-index: 5;
  padding: 13px 15px;
}
.card-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #8A8780; margin-bottom: 10px;
}

/* Analytics — bottom left */
.card-analytics {
  left: 4%; top: 57%;
  width: 136px;
  animation: floatB 6.6s ease-in-out infinite;
  animation-delay: -2.1s;
}
.a-bars {
  display: flex; align-items: flex-end;
  gap: 4px; height: 46px; margin-bottom: 9px;
}
.a-bar {
  flex: 1; border-radius: 3px 3px 0 0;
  background: #111;
  transform-origin: center bottom;
  animation: barPulse 3.9s ease-in-out infinite;
}
.a-bar:nth-child(1) { height: 50%; animation-delay: -.4s; }
.a-bar:nth-child(2) { height: 76%; background: #DDD9D3; animation-delay: -1.1s; }
.a-bar:nth-child(3) { height: 62%; animation-delay: -.8s; }
.a-bar:nth-child(4) { height: 94%; animation-delay: -2s; }
.a-bar:nth-child(5) { height: 42%; background: #DDD9D3; animation-delay: -1.6s; }
.a-stat { font-size: 19px; font-weight: 800; color: #111; line-height: 1; }
.a-sub  { font-size: 9.5px; color: #8A8780; margin-top: 2px; }

/* Color system — top left */
.card-colors {
  left: 3%; top: 10%;
  width: 158px;
  animation: floatC 7.2s ease-in-out infinite;
  animation-delay: -3.8s;
}
.swatches {
  display: flex; gap: 6px;
  align-items: center; margin-bottom: 7px;
}
.swatch {
  width: 24px; height: 24px; border-radius: 50%;
  flex-shrink: 0;
}
.swatch-row {
  display: flex; gap: 6px;
}
.swatch-hex {
  font-size: 7.5px; color: #AAAAAA;
  width: 24px; text-align: center;
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  letter-spacing: 0.02em;
}

/* Typography — top right */
.card-type {
  right: 4%; top: 7%;
  width: 136px;
  animation: floatD 5.9s ease-in-out infinite;
  animation-delay: -1.3s;
}
.type-big {
  font-size: 36px; font-weight: 800;
  color: #111; line-height: 1;
  letter-spacing: -0.035em; margin-bottom: 9px;
}
.type-weights { display: flex; flex-direction: column; gap: 4px; }
.type-wbar { height: 4px; border-radius: 2px; background: #DDD9D3; }

/* Components — bottom right */
.card-comp {
  right: 4%; top: 58%;
  width: 150px;
  animation: floatB 6.3s ease-in-out infinite;
  animation-delay: -4.7s;
}
.comp-btn {
  width: 100%; height: 30px;
  background: #111; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.comp-btn-bar {
  width: 50px; height: 5px;
  background: rgba(255,255,255,0.4); border-radius: 3px;
}
.comp-row {
  display: flex; align-items: center;
  justify-content: space-between;
}
.comp-lbl { font-size: 11px; font-weight: 500; color: #111; }
.toggle-track {
  width: 36px; height: 20px; border-radius: 10px;
  position: relative; flex-shrink: 0;
  animation: toggleBg 4.6s ease-in-out infinite;
  animation-delay: -2.4s;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%; background: white;
  animation: toggleSlide 4.6s ease-in-out infinite;
  animation-delay: -2.4s;
}

/* ─── CURSOR ─── */
.cursor-wrap {
  position: absolute;
  top: 44%; right: 20%;
  z-index: 20;
  animation: cursorMove 7.2s ease-in-out infinite;
  animation-delay: -3.2s;
}
.cursor-ripple {
  position: absolute; top: -2px; left: -2px;
  width: 22px; height: 22px;
  border: 1.5px solid #111; border-radius: 50%;
  animation: ripple 7.2s ease-out infinite;
  animation-delay: -5.1s;
}
.cursor-tag {
  position: absolute;
  top: 18px; left: 14px;
  background: #111; color: #fff;
  font-size: 9px; font-weight: 500;
  padding: 2px 7px 3px;
  border-radius: 0 4px 4px 4px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .hero-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scene *, .scene *::before, .scene *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
