html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

.iphone-frame {
  width: 320px;
  height: 626px;
  border-radius: 3rem;
  border: 10px solid #1e293b;
  background: #0f172a;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  padding: 12px;
  position: relative;
}

.dashboard-panel {
  transform: perspective(1200px) translateZ(0);
  transform-origin: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .dashboard-panel:hover {
    transform: perspective(1200px) translateZ(-48px) scale(0.975);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
  }
}

.iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 132px;
  height: 22px;
  border-radius: 999px;
  background: #0b1228;
  z-index: 20;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 2.4rem;
  overflow: hidden;
  background: #f1f5f9;
  padding-top: 8px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 20px 16px 12px;
}

.chat-body {
  position: relative;
  height: calc(100% - 82px);
  overflow: hidden;
  background: #f1f5f9;
  padding: 14px 14px 0;
}

.chat-body-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), #f1f5f9 38%, #e2e8f0);
}

.lead-bubble {
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
  opacity: 0;
  transform: translateY(14px);
  animation: bubbleIn 0.6s ease forwards;
}

.lead-bubble small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.dashboard-kpi p {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.dashboard-kpi strong {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-weight: 700;
}

.kpi-meta {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.kpi-meta-positive {
  color: #059669;
}

.donut-ring {
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: conic-gradient(#4f46e5 0 72%, #10b981 72% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-ring span {
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
}

.dashboard-chart-card {
  overflow: hidden;
}

.dashboard-line-chart {
  display: block;
  max-width: 100%;
}

.floating-tag {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.portfolio-image-wrap {
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.portfolio-image {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  height: 100%;
}

.portfolio-image-landscape {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.portfolio-image-landscape .portfolio-image {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portfolio-copy-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 0.75rem 1rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
  background: #ffffff;
}

.select-wrap {
  position: relative;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.8rem;
}

.select-icon {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-dot-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.form-step {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.form-step.is-active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}

.form-step.is-hidden {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  position: absolute;
  inset: 56px 0 0;
}

@media (max-width: 1023px) {
  .portfolio-copy-side {
    min-height: 100%;
  }
}

@media (max-width: 767px) {
  .iphone-frame {
    width: 186px;
    height: 296px;
    border-width: 8px;
    border-radius: 2rem;
    padding: 8px;
  }

  .iphone-notch {
    width: 88px;
    height: 12px;
    top: 6px;
  }

  .iphone-screen {
    border-radius: 1.45rem;
    padding-top: 6px;
  }

  .chat-header {
    padding: 14px 10px 8px;
  }

  .chat-body {
    height: calc(100% - 62px);
    padding: 10px 8px 0;
  }

  .lead-bubble {
    border-radius: 12px;
    padding: 8px 9px;
    font-size: 10px;
    line-height: 1.35;
  }

  .lead-bubble small {
    font-size: 9px;
  }

  .portfolio-image-landscape {
    aspect-ratio: 16 / 10;
  }

  .dashboard-kpi strong {
    font-size: 28px;
  }

  .dashboard-panel {
    overflow: hidden;
  }

  .dashboard-chart-card {
    padding: 1rem;
  }

  .dashboard-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .dashboard-chart-header h3 {
    font-size: 1.05rem;
    line-height: 1.35;
  }

  .dashboard-period-tabs {
    width: 100%;
    max-width: 245px;
  }

  .dashboard-period-tabs span {
    flex: 1;
    text-align: center;
  }

  .dashboard-line-chart {
    height: 190px;
  }

  .dashboard-line-legend {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .donut-ring {
    width: 170px;
    height: 170px;
  }

  .donut-ring span {
    width: 112px;
    height: 112px;
  }

  .lead-form-card {
    padding: 1rem;
  }
}
