/* ========================================================================
   HERO ANIMATION – Browser + Code Editor Live Demo
   ======================================================================== */

/* ---- Container ---- */
.hero-anim {
  position: relative;
  width: 100%;
  padding-bottom: 30px;
}

/* ---- Browser Window ---- */
.hero-browser-win {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  text-align: left;
}

.browser-chrome {
  background: #dee1e6;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-address {
  flex: 1;
  background: #fff;
  border-radius: 20px;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #5f6368;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.browser-url-text {
  color: #202124;
  font-size: 11.5px;
}

/* ---- Browser Body / Preview ---- */
.browser-body {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #f8faff 0%, #edf3fc 40%, #f0f4fb 100%);
}

/* Subtle decorative glow */
.browser-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(56, 118, 179, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(56, 118, 179, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Preview Site (inside browser) ---- */
.preview-site {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.preview-nav {
  padding: 10px 24px;
  background: #fff;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-nav.active {
  opacity: 1;
  transform: translateY(0);
}

.preview-logo {
  height: 26px;
  width: auto;
  display: block;
}

.preview-main {
  padding: 30px 52px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- Preview Hero Layout (Image + Text) ---- */
.preview-hero-layout {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
}

.preview-hero-img {
  flex: 0 0 42%;
  opacity: 0;
  transform: translateX(15px) scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-hero-img.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.preview-mockup-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
}

.preview-hero-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- Preview Content Elements ---- */
.preview-h1 {
  color: #0a2240;
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-h1.active {
  opacity: 1;
  transform: translateY(0);
}

.preview-h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #2663aa, #3876b3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.preview-p {
  color: #5a6a7e;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0 0 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease 0.05s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.preview-p.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Buttons ---- */
.preview-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview-btns.active {
  opacity: 1;
  transform: translateY(0);
}

.preview-btn {
  display: inline-block;
  background: linear-gradient(135deg, #0a2240, #2663aa);
  color: #fff;
  padding: 6px 18px;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 10px rgba(10, 34, 64, 0.18);
}

.preview-btn-outline {
  display: inline-block;
  background: #fff;
  color: #0a2240;
  padding: 5px 18px;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1.5px solid #0a2240;
}

/* ---- Preview Dark Section (below hero) ---- */
.preview-dark-section {
  background: #0a1628;
  padding: 22px 52px 26px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-dark-section.active {
  opacity: 1;
  transform: translateY(0);
}

.preview-section-subtitle {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Poppins', sans-serif;
  font-size: 8.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  text-align: center;
}

.preview-section-heading {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

/* ---- Benefit Cards ---- */
.preview-benefits {
  display: flex;
  gap: 12px;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease 0.05s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}

.preview-benefits.active {
  opacity: 1;
  transform: translateY(0);
}

.preview-benefit-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
}

.preview-benefit-icon {
  color: #5a9fd4;
  font-size: 14px;
  margin-bottom: 8px;
}

.preview-benefit-title {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 5px;
}

.preview-benefit-desc {
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Poppins', sans-serif;
  font-size: 8.5px;
  line-height: 1.55;
}

/* ---- VS Code Editor Window ---- */
.hero-editor-win {
  position: absolute;
  bottom: -80px;
  right: -20px;
  width: 56%;
  border-radius: 10px;
  overflow: hidden;
  background: #1e1e1e;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 2;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.editor-chrome {
  background: #323233;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #252526;
  flex-shrink: 0;
}

.ed-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.ed-dot.red    { background: #ff5f57; }
.ed-dot.yellow { background: #febc2e; }
.ed-dot.green  { background: #28c840; }

.editor-win-title {
  margin-left: 8px;
  color: #999;
  font-size: 10px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.editor-tab-bar {
  background: #252526;
  display: flex;
  border-bottom: 1px solid #1e1e1e;
  flex-shrink: 0;
}

.editor-tab-active {
  background: #1e1e1e;
  padding: 5px 14px;
  color: #fff;
  font-size: 10px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  border-top: 2px solid #007acc;
  display: flex;
  align-items: center;
  gap: 5px;
}

.html-icon {
  color: #e44d26;
  font-size: 9px;
  font-weight: bold;
}

.editor-tab-inactive {
  padding: 5px 14px;
  color: #888;
  font-size: 10px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  border-top: 2px solid transparent;
}

/* ---- Editor Code Area ---- */
.editor-content {
  display: flex;
  align-items: flex-start;
  height: 195px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.editor-content::-webkit-scrollbar {
  display: none;
}

.editor-gutter {
  text-align: right;
  padding: 0 8px 0 12px;
  color: #858585;
  user-select: none;
  min-width: 32px;
  font-size: 10.5px;
  line-height: 1.55;
  font-family: 'Consolas', 'Courier New', monospace;
  flex-shrink: 0;
}

.editor-code-area {
  padding: 0 12px 0 6px;
  color: #d4d4d4;
  font-size: 10.5px;
  line-height: 1.55;
  font-family: 'Consolas', 'Courier New', monospace;
  flex: 1;
  overflow: hidden;
}

.code-line {
  white-space: pre;
  min-height: 1em;
}

.code-line.active-line {
  background: rgba(255, 255, 255, 0.04);
  margin: 0 -12px 0 -6px;
  padding: 0 12px 0 6px;
}

.code-line.selected {
  background: rgba(38, 79, 120, 0.65);
  margin: 0 -12px 0 -6px;
  padding: 0 12px 0 6px;
}

.gutter-num {
  min-height: 1em;
}

/* ---- Blinking Cursor ---- */
.editor-cursor {
  display: inline-block;
  width: 1.8px;
  height: 14px;
  background: #aeafad;
  vertical-align: text-bottom;
  animation: heroCursorBlink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes heroCursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ---- Status Bar ---- */
.editor-status {
  background: #007acc;
  padding: 3px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 9px;
  color: #fff;
  flex-shrink: 0;
}

.editor-status div {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

@media (max-width: 1200px) {
  .hero-editor-win {
    width: 58%;
    right: -15px;
  }
}

@media (max-width: 992px) {
  .hero-anim {
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: 25px;
    padding-top: 10px;
  }

  .hero-editor-win {
    width: 60%;
    right: -10px;
    bottom: -60px;
  }

  .preview-main {
    padding: 26px 40px;
  }

  .preview-dark-section {
    padding: 18px 40px 22px;
  }
}

@media (max-width: 768px) {
  .hero-anim {
    max-width: 460px;
    padding-bottom: 20px;
  }

  .hero-editor-win {
    width: 62%;
    right: -5px;
    bottom: -50px;
  }

  .preview-h1 {
    font-size: 18px;
  }

  .preview-p {
    font-size: 11.5px;
  }

  .preview-hero-layout {
    gap: 14px;
  }

  .preview-hero-img {
    flex: 0 0 30%;
  }

  .preview-mockup-img {
    max-height: 160px;
  }

  .preview-main {
    padding: 22px 32px;
  }

  .preview-dark-section {
    padding: 16px 32px 20px;
  }

  .preview-section-heading {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .preview-benefit-card {
    padding: 10px 10px 8px;
  }

  .preview-benefit-icon {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .preview-benefit-title {
    font-size: 9px;
  }

  .preview-benefit-desc {
    font-size: 7.5px;
  }

  .editor-content {
    height: 165px;
  }

  .editor-code-area,
  .editor-gutter {
    font-size: 9.5px;
  }
}

@media (max-width: 576px) {
  .hero-anim {
    max-width: 100%;
    padding-bottom: 15px;
  }

  .hero-editor-win {
    width: 65%;
    right: 0;
    bottom: -40px;
  }

  .browser-chrome {
    padding: 7px 10px;
    gap: 8px;
  }

  .browser-dots span {
    width: 9px;
    height: 9px;
  }

  .browser-address {
    padding: 4px 12px;
    font-size: 10px;
  }

  .browser-url-text {
    font-size: 10px;
  }

  .preview-nav {
    padding: 8px 18px;
  }

  .preview-logo {
    height: 20px;
  }

  .preview-hero-layout {
    gap: 12px;
  }

  .preview-hero-img {
    flex: 0 0 40%;
  }

  .preview-mockup-img {
    max-height: 180px;
  }

  .preview-h1 {
    font-size: 16px;
  }

  .preview-p {
    font-size: 10.5px;
  }

  .preview-btn {
    font-size: 8px;
    padding: 5px 14px;
  }

  .preview-btn-outline {
    font-size: 8px;
    padding: 4px 14px;
  }

  .preview-main {
    padding: 18px 24px;
  }

  .preview-dark-section {
    padding: 14px 24px 18px;
  }

  .preview-section-subtitle {
    font-size: 7px;
  }

  .preview-section-heading {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .preview-benefit-card {
    padding: 8px 8px 6px;
  }

  .preview-benefit-icon {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .preview-benefit-title {
    font-size: 8px;
  }

  .preview-benefit-desc {
    font-size: 7px;
  }

  .editor-content {
    height: 140px;
  }

  .editor-code-area,
  .editor-gutter {
    font-size: 8.5px;
    line-height: 1.5;
  }

  .editor-gutter {
    min-width: 26px;
    padding: 0 6px 0 8px;
  }

  .editor-chrome {
    padding: 6px 10px;
  }

  .ed-dot {
    width: 8px;
    height: 8px;
  }

  .editor-win-title {
    font-size: 8.5px;
  }

  .editor-tab-active,
  .editor-tab-inactive {
    font-size: 8.5px;
    padding: 4px 10px;
  }

  .editor-status {
    font-size: 8px;
    padding: 2px 8px;
  }

  .editor-cursor {
    height: 11px;
    width: 1.5px;
  }
}
