/* ========================================
   INSTALL MODERN — Dribbble-inspired
   ======================================== */

/* ========== ANIMATIONS ========== */
@keyframes instFadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes instBounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes instGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes instFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes instProgressGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* ========== SCROLL REVEAL ========== */
.inst-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.inst-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.inst-reveal-delay-1 { transition-delay: 0.1s; }
.inst-reveal-delay-2 { transition-delay: 0.2s; }
.inst-reveal-delay-3 { transition-delay: 0.3s; }
.inst-reveal-delay-4 { transition-delay: 0.4s; }
.inst-reveal-delay-5 { transition-delay: 0.5s; }
.inst-reveal-delay-6 { transition-delay: 0.6s; }

/* ========== HERO ========== */
.inst-hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 40%, #e3edf7 100%);
  background-size: 200% 200%;
  animation: instGradientShift 12s ease infinite;
}

.inst-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 194, 255, 0.08) 0%, transparent 70%);
  animation: instFloat 8s ease-in-out infinite;
  pointer-events: none;
}

.inst-hero-content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: instFadeInUp 0.8s ease-out;
}

.inst-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(43, 194, 255, 0.12);
  border: 1px solid rgba(43, 194, 255, 0.25);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--puramane-navy);
  margin-bottom: 1.5rem;
  animation: instBounceIn 0.6s ease-out 0.3s both;
}

.inst-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--puramane-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.inst-hero-text {
  font-size: 1.1875rem;
  color: rgba(69, 87, 99, 0.7);
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 auto;
}

/* ========== STEPPER SECTION ========== */
.inst-stepper-section {
  padding: 5rem 0;
  background: white;
}

.inst-stepper-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}

/* Stepper vertical container */
.inst-stepper {
  position: relative;
  padding-left: 3rem;
}

/* Vertical progress line (background) */
.inst-stepper-line {
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(69, 87, 99, 0.1);
  border-radius: 2px;
}

/* Animated fill line */
.inst-stepper-line-fill {
  position: absolute;
  left: 1.25rem;
  top: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--puramane-navy) 0%, rgba(43, 194, 255, 0.6) 100%);
  border-radius: 2px;
  transform-origin: top;
  transition: height 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Step item */
.inst-step {
  position: relative;
  padding-bottom: 2.5rem;
}

.inst-step:last-child {
  padding-bottom: 0;
}

/* Step number circle */
.inst-step-circle {
  position: absolute;
  left: -3rem;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(69, 87, 99, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(69, 87, 99, 0.5);
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.inst-step.active .inst-step-circle {
  background: var(--puramane-navy);
  border-color: var(--puramane-navy);
  color: white;
  box-shadow: 0 4px 12px rgba(69, 87, 99, 0.25);
}

/* Step content card */
.inst-step-content {
  background: white;
  border: 1px solid rgba(69, 87, 99, 0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.inst-step-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(69, 87, 99, 0.08);
  border-color: rgba(69, 87, 99, 0.15);
}

.inst-step.active .inst-step-content {
  border-color: rgba(43, 194, 255, 0.3);
  box-shadow: 0 4px 16px rgba(43, 194, 255, 0.1);
}

.inst-step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--puramane-navy);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inst-step-desc {
  font-size: 0.9375rem;
  color: rgba(69, 87, 99, 0.65);
  line-height: 1.6;
}

.inst-step-check {
  color: #10b981;
  flex-shrink: 0;
}

/* ========== VIDEO STICKY ========== */
.inst-video-sticky {
  position: sticky;
  top: 6rem;
}

.inst-video-card {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(69, 87, 99, 0.08);
  background: white;
  box-shadow: 0 8px 24px rgba(69, 87, 99, 0.06);
  transition: box-shadow 0.3s ease;
}

.inst-video-card:hover {
  box-shadow: 0 16px 40px rgba(69, 87, 99, 0.1);
}

.inst-video-wrapper {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(69, 87, 99, 0.15) 0%, rgba(214, 201, 180, 0.15) 100%);
}

.inst-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.inst-video-info {
  padding: 1.5rem;
}

.inst-video-info h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--puramane-navy);
  margin-bottom: 0.5rem;
}

.inst-video-info p {
  font-size: 0.875rem;
  color: rgba(69, 87, 99, 0.6);
}

/* ========== TIPS SECTION ========== */
.inst-tips {
  padding: 5rem 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.inst-tips-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--puramane-navy);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.inst-tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

.inst-tip-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid rgba(69, 87, 99, 0.06);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s ease;
}

.inst-tip-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(69, 87, 99, 0.08);
}

.inst-tip-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--puramane-navy);
  margin-bottom: 0.75rem;
}

.inst-tip-card p {
  font-size: 0.9375rem;
  color: rgba(69, 87, 99, 0.65);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.inst-tip-note {
  font-size: 0.8125rem;
  color: rgba(69, 87, 99, 0.45);
  font-style: italic;
}

.inst-tip-list {
  font-size: 0.9375rem;
  color: rgba(69, 87, 99, 0.65);
  list-style: disc;
  padding-left: 1.5rem;
  line-height: 1.6;
}

/* Mobile tips carousel dots */
.inst-tips-dots {
  display: none;
}

/* ========== TECHNICAL POINTS ========== */
.inst-tech {
  padding: 5rem 0;
  background: white;
}

.inst-tech-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--puramane-navy);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.inst-tech-grid {
  display: grid;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.inst-tech-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: rgba(69, 87, 99, 0.03);
  border-left: 4px solid var(--puramane-navy);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.3s ease;
}

.inst-tech-item:hover {
  transform: translateX(4px);
  background: rgba(69, 87, 99, 0.06);
}

.inst-tech-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.inst-tech-icon.visible {
  opacity: 1;
  transform: scale(1);
}

.inst-tech-item p {
  font-size: 0.9375rem;
  color: rgba(69, 87, 99, 0.7);
  line-height: 1.6;
}

/* ========== CTA ========== */
.inst-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--puramane-navy) 0%, #2d3a47 50%, #1e2a36 100%);
  position: relative;
  overflow: hidden;
}

.inst-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 194, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.inst-cta-inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 2rem;
}

.inst-cta h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.inst-cta p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.inst-cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.inst-cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--puramane-navy);
  border-radius: 100px;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.inst-cta-btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.inst-cta-btn-primary:active {
  transform: scale(0.97);
}

.inst-cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.inst-cta-btn-secondary:hover {
  transform: translateY(-2px);
  border-color: white;
}

/* ========== RESPONSIVE ========== */

/* Large desktop (1280px+) */
@media (min-width: 1280px) {
  .inst-hero h1 { font-size: 3.5rem; }
  .inst-stepper-grid { gap: 5rem; }
}

/* Small desktop (1024-1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .inst-stepper-grid { gap: 3rem; }
  .inst-hero h1 { font-size: 2.75rem; }
}

/* Tablet (769-1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .inst-hero { padding: 4rem 0 3rem; }
  .inst-hero h1 { font-size: 2.25rem; }
  .inst-hero-text { font-size: 1.0625rem; }
  .inst-stepper-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 640px;
  }
  .inst-video-sticky { position: relative; top: 0; }
  .inst-tips-grid { grid-template-columns: repeat(2, 1fr); }
  .inst-tips-grid > :last-child { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  .inst-hero {
    padding: 2.5rem 0 2rem;
  }
  .inst-hero::before { display: none; }
  .inst-hero h1 { font-size: 2rem; }
  .inst-hero-text { font-size: 1rem; margin-bottom: 1rem; }
  .inst-hero-content { padding: 0 1.25rem; }

  .inst-stepper-section { padding: 3rem 0; }
  .inst-stepper-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.25rem;
  }

  .inst-video-sticky {
    position: relative;
    top: 0;
    order: -1;
  }

  .inst-stepper { padding-left: 2.5rem; }
  .inst-stepper-line,
  .inst-stepper-line-fill { left: 0.875rem; }
  .inst-step-circle {
    left: -2.5rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.6875rem;
  }

  .inst-step-content {
    padding: 1.25rem;
  }

  .inst-tips { padding: 3rem 0; }
  .inst-tips-title { font-size: 1.5rem; padding: 0 1.25rem; margin-bottom: 2rem; }
  .inst-tips-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .inst-tips-grid::-webkit-scrollbar { display: none; }
  .inst-tip-card {
    min-width: 85vw;
    scroll-snap-align: center;
    flex-shrink: 0;
    margin: 0 0.5rem;
    border-radius: 1rem;
  }
  .inst-tip-card:first-child { margin-left: 1.25rem; }
  .inst-tip-card:last-child { margin-right: 1.25rem; }

  .inst-tips-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
  .inst-tips-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(69, 87, 99, 0.25);
    transition: all 0.3s ease;
  }
  .inst-tips-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--puramane-navy);
  }

  .inst-tech { padding: 3rem 0; }
  .inst-tech-title { font-size: 1.5rem; padding: 0 1.25rem; margin-bottom: 2rem; }
  .inst-tech-grid { padding: 0 1.25rem; }

  .inst-cta { padding: 3.5rem 0; }
  .inst-cta::before { display: none; }
  .inst-cta h2 { font-size: 1.75rem; }
  .inst-cta p { font-size: 1rem; }
  .inst-cta-btns { flex-direction: column; padding: 0 1.25rem; }
  .inst-cta-btn-primary,
  .inst-cta-btn-secondary { width: 100%; justify-content: center; }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  .inst-hero h1 { font-size: 1.75rem; }
  .inst-tip-card { min-width: 90vw; }
  .inst-step-content { padding: 1rem; }
  .inst-cta h2 { font-size: 1.5rem; }
}
