/* homepage.css - JiFish Multi-Section Landing Page v7 */
/* Inspired by Educ/Dribbble premium education design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ====== HOME PAGE ====== */
#home-page {
  position: relative;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #f8fffe;
  scroll-behavior: smooth;
}

/* ============================================ */
/*  SECTION 1: HERO — 2-Column Layout           */
/* ============================================ */
.hero-section {
  position: relative;
  min-height: 80vh;
  padding: 50px 5% 70px;
  background: #f8fffe;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 50px;
  background: #f0fafb;
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 2;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  gap: 50px;
  position: relative;
  z-index: 3;
}

/* --- Hero Text (Left) --- */
.hero-text {
  flex: 1;
  max-width: 520px;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.hero-text h1 span {
  color: #0891b2;
}

.hero-text>p {
  font-size: 1.05rem;
  color: #64748b;
  margin: 0 0 28px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
  background: #0891b2;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.4);
  background: #0e7490;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-cta-secondary:hover {
  color: #0891b2;
}

/* Social Proof */
.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-stack {
  display: flex;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid #fff;
  margin-left: -8px;
  position: relative;
}

.avatar-circle:first-child {
  margin-left: 0;
}

.proof-text {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: #475569;
}

.proof-text strong {
  color: #0f172a;
  font-size: 0.85rem;
}

/* --- Hero Visual (Right) --- */
.hero-visual {
  flex: 1;
  max-width: 450px;
  min-height: 520px;
  --sensei-normal-x: -125px;
  --sensei-normal-y: 0px;
  --sensei-normal-scale: 0.64;
  --sensei-expanded-x: 40px;
  --sensei-expanded-y: 110px;
  --sensei-expanded-scale: 1;
  --circle-shrunk-size: 360px;
  --circle-shrunk-right: 170px;
  --circle-shrunk-bottom: -10px;
  --mobile-offset-x: 0px;
  --mobile-scale-factor: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-visual.hero-visual-active {
  align-items: flex-end;
  justify-content: flex-end;
}

.hero-img-circle {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: var(--sensei-bg, linear-gradient(135deg, #e0f7fa, #b2ebf2, #80deea));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 3px dashed #0891b2;
}

.hero-sensei-img {
  position: absolute;
  right: 0;
  bottom: 0;
  transform-origin: bottom right;
  transform: translate3d(calc(var(--sensei-normal-x) + var(--mobile-offset-x)), var(--sensei-normal-y), 0) scale(calc(var(--sensei-normal-scale) * var(--mobile-scale-factor)));
  height: 533px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom right;
  z-index: 12;
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 12px rgba(0, 40, 50, 0.15));
}

/* Mini Sensei Avatars */
.sensei-mini {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  z-index: 10;
  border: 2px solid var(--mini-sensei-border, #ffffff);
  background: var(--mini-sensei-bg, #ffffff);
  box-shadow: 0 4px 16px rgba(0, 50, 60, 0.15);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.35s ease, background 0.35s ease, border-color 0.35s ease;
  animation: badgeFloat 3s ease-in-out infinite;
}

.sensei-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease;
}

.sensei-mini:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 50, 60, 0.25);
}

.mini-top-right {
  top: 10px;
  right: 0px;
}

/* Swap animations */
.hero-img-circle.swap-out {
  animation: heroSwapOut 0.4s ease-in forwards;
}

.hero-img-circle.swap-in {
  animation: heroSwapIn 0.5s ease-out forwards;
}

.sensei-mini.swap-out {
  animation: miniSwapOut 0.3s ease-in forwards !important;
}

.sensei-mini.swap-in {
  animation: miniSwapIn 0.3s ease-out forwards !important;
}

@keyframes heroSwapOut {
  to {
    transform: scale(0.3);
    opacity: 0;
  }
}

@keyframes heroSwapIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes miniSwapOut {
  to {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes miniSwapIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes badgeFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============================================ */
/*  INLINE EXPAND STATE                         */
/* ============================================ */

.hero-text {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Hero detail: shown when expanded */
.hero-detail {
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  position: static;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: opacity 1.05s ease, transform 1.15s cubic-bezier(0.22, 1, 0.36, 1), max-height 1.25s cubic-bezier(0.22, 1, 0.36, 1), margin-top 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-detail.hover-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: static;
  max-height: 380px;
  margin-top: 18px;
}

.hero-detail-content {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.95s ease, transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-detail.hover-visible .hero-detail-content {
  opacity: 1;
  transform: translateY(0);
}

.hero-detail.hover-fadeout .hero-detail-content {
  opacity: 0;
  transform: translateY(6px);
}

.hero-detail-name {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-detail-item .detail-star {
  color: #0891b2;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hero-detail-message {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #64748b;
  font-style: italic;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-detail.hover-visible .hero-detail-name,
.hero-detail.hover-visible .hero-detail-item,
.hero-detail.hover-visible .hero-detail-message {
  opacity: 1;
  transform: translateY(0);
}

/* Circle: shrink to corner */
.hero-img-circle {
  transition: background 2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-img-circle.shrunk {
  width: var(--circle-shrunk-size) !important;
  height: var(--circle-shrunk-size) !important;
  position: absolute;
  bottom: var(--circle-shrunk-bottom);
  right: var(--circle-shrunk-right);
  border-width: 3px;
  z-index: 5;
  pointer-events: none;
}

/* Sensei image: expand out of circle — anchor at bottom-right of .hero-visual */
.hero-sensei-img {
  transition: transform 2.2s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.2s ease,
    filter 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-sensei-img.expanded {
  transform: translate3d(calc(var(--sensei-expanded-x) + var(--mobile-offset-x)), var(--sensei-expanded-y), 0) scale(calc(var(--sensei-expanded-scale) * var(--mobile-scale-factor)));
  z-index: 15;
  filter: drop-shadow(0 8px 24px rgba(0, 40, 50, 0.2));
}

/* ============================================ */
/*  SENSEI CIRCLE INFO (inside bubble)          */
/* ============================================ */
.sensei-circle-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 18px 22px;
  width: 85%;
  max-width: 290px;
  text-align: left;
  z-index: 6;
  box-shadow: 0 4px 20px rgba(0, 40, 50, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: opacity 0.5s ease;
}

.circle-info-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.3;
}

.circle-info-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}

.circle-info-icon {
  flex-shrink: 0;
  font-size: 0.85rem;
}

.circle-info-message {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  color: #64748b;
  font-style: italic;
  line-height: 1.5;
}

/* Hero Bubbles */
.hero-bubble {
  position: absolute;
  background: rgba(8, 145, 178, 0.08);
  border-radius: 50%;
  border: 1px solid rgba(8, 145, 178, 0.06);
  pointer-events: none;
  animation: bubbleUp linear infinite;
}

@keyframes bubbleUp {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }

  15% {
    opacity: 0.5;
  }

  85% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-70vh) scale(1);
    opacity: 0;
  }
}

/* ============================================ */
/*  SECTION 2: FEATURES                         */
/* ============================================ */
.features-section {
  padding: 60px 24px 40px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  background: #f0fafb;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0e4d5c;
  margin: 0 0 8px;
}

.section-subtitle {
  font-size: 1rem;
  color: #5f8a94;
  margin: 0 0 36px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 50, 60, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 150, 167, 0.06);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 50, 60, 0.12);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0e4d5c;
  margin: 0 0 6px;
}

.feature-card p {
  font-size: 0.85rem;
  color: #6b8a92;
  margin: 0;
  line-height: 1.5;
}

/* ============================================ */
/*  SECTION 3: SENSEI SHOWCASE                  */
/* ============================================ */
.sensei-section {
  padding: 50px 24px 60px;
  background: linear-gradient(180deg, #f0fafb, #e0f2f1);
}

.sensei-section .section-title,
.sensei-section .section-subtitle {
  text-align: center;
}

.sensei-grid {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.sensei-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  width: 320px;
  box-shadow: 0 6px 24px rgba(0, 50, 60, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 150, 167, 0.06);
}

.sensei-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 50, 60, 0.14);
}

.sensei-card-img {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.sensei-card-img img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 4px 12px rgba(0, 40, 50, 0.2));
}

.sensei-card-body {
  padding: 20px 22px 24px;
}

.sensei-card-label {
  font-size: 0.65rem;
  color: #0891b2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.sensei-card-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.sensei-card-quote {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #64748b;
  font-style: italic;
  margin: 0;
}

/* ============================================ */
/*  SECTION 4: BOTTOM CTA                       */
/* ============================================ */
.cta-section {
  padding: 50px 24px;
  text-align: center;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.cta-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  text-shadow: 0 2px 8px rgba(0, 50, 60, 0.3);
}

.cta-section p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: #fff;
  color: #0891b2;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  text-decoration: none;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  background: #e0f7fa;
}

/* ============================================ */
/*  RESPONSIVE                                  */
/* ============================================ */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 30px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-social-proof {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
    max-width: 320px;
    min-height: 420px;
    margin: 0 auto;
    --mobile-offset-x: 10px;
    --mobile-scale-factor: 0.72;
    --circle-shrunk-size: 260px;
    --circle-shrunk-right: 80px;
    --circle-shrunk-bottom: -5px;
  }

  .hero-img-circle {
    width: 260px;
    height: 260px;
  }

  .float-badge {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .sensei-card {
    width: 280px;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .sensei-card {
    width: 100%;
    max-width: 320px;
  }

  .hero-visual {
    width: 100%;
    max-width: 260px;
    min-height: 340px;
    margin: 0 auto;
    --mobile-offset-x: 20px;
    --mobile-scale-factor: 0.58;
    --circle-shrunk-size: 240px;
    --circle-shrunk-right: 85px;
    --circle-shrunk-bottom: 20px;
  }

  .hero-img-circle {
    width: 220px;
    height: 220px;
  }

  .sensei-circle-info {
    left: 50%;
    width: 220px;
    padding: 18px 22px;
    transform: translate(-50%, -50%) scale(0.72);
  }
  
  .circle-info-name {
    font-size: 1.15rem;
  }
  
  .circle-info-item {
    font-size: 0.8rem;
  }
}

/* ============================================ */
/*  INTRO SHOWCASE (replaces feature cards)     */
/* ============================================ */
.intro-showcase {
  padding: 60px 24px 40px;
  max-width: 1060px;
  margin: 0 auto;
  text-align: center;
  background: #f0fafb;
}
.intro-img-wrap {
  margin-top: 32px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 50, 60, 0.08),
    0 2px 8px rgba(0, 50, 60, 0.04);
  border: 1px solid rgba(8, 145, 178, 0.08);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.intro-img-wrap:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0, 50, 60, 0.12),
    0 4px 12px rgba(0, 50, 60, 0.06);
}
.intro-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================ */
/*  SENSEI MODAL                                */
/* ============================================ */

/* Make sensei elements clickable */
.hero-sensei-img {
  cursor: pointer;
}

.sensei-card {
  cursor: pointer;
}

/* Overlay */
.sensei-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sensei-modal-overlay.active {
  opacity: 1;
}

/* Modal Container */
.sensei-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 680px;
  width: 90%;
  display: flex;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.sensei-modal-overlay.active .sensei-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Left: Image */
.sensei-modal-img {
  width: 260px;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sensei-modal-img img {
  height: 90%;
  width: auto;
  max-width: 95%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 4px 12px rgba(0, 40, 50, 0.15));
}

/* Right: Info */
.sensei-modal-info {
  flex: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.sensei-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sensei-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sensei-modal-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
}

.sensei-modal-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  /* Stagger animation */
  opacity: 0;
  transform: translateY(12px);
  animation: modalInfoSlide 0.4s ease-out forwards;
}

.sensei-modal-detail .detail-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Stagger delays — set via JS inline style */
@keyframes modalInfoSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sensei-modal-message {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  line-height: 1.6;
  /* Also staggered */
  opacity: 0;
  transform: translateY(12px);
  animation: modalInfoSlide 0.4s ease-out forwards;
}

/* Responsive — stack on mobile */
@media (max-width: 600px) {
  .sensei-modal {
    flex-direction: column;
    max-width: 360px;
  }

  .sensei-modal-img {
    width: 100%;
    min-height: 220px;
    height: 220px;
  }

  .sensei-modal-info {
    padding: 24px 20px;
  }

  .sensei-modal-name {
    font-size: 1.3rem;
  }
}