/* ================================================
   MONKI — Mobile / Tablet Styles
   Triggered by:  html.mobile-mode  class
   • Added automatically by JS on real mobile (≤ 1024px viewport)
   • Added by the MOB dev-toggle button on desktop

   SCALING STRATEGY (mirrors desktop approach):
   All sections designed at a fixed 390×844px canvas.
   JS applies scale(min(vw/390, vh/844)) to every stage.
   All values below are in 390px-canvas coordinates.
   Desktop (style.css) is NEVER modified here.
   ================================================ */

/* ════════════════════════════════════════════════
   GLOBAL
   Strategy: body is NOT the scroll container.
   #app scrolls instead. The navbar lives at body
   level (moved by JS), so nothing above it scrolls
   — this defeats the Safari iframe position:fixed bug.
   ════════════════════════════════════════════════ */
html.mobile-mode,
html.mobile-mode body {
  height: 100svh !important;
  overflow: hidden !important;
}

/* Hide scrollbars visually on mobile (scroll still works) */
html.mobile-mode *::-webkit-scrollbar { display: none !important; }
html.mobile-mode * { scrollbar-width: none !important; -ms-overflow-style: none !important; }

/* #app is the scroll container — vertical only */
html.mobile-mode #app {
  height: 100svh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
}

/* Section wrappers: height is set by JS (scaledH) */
html.mobile-mode .hero-container,
html.mobile-mode .contact-section {
  overflow: hidden !important;
  position: relative !important;
}

html.mobile-mode .survey-section {
  overflow: visible !important;
  position: relative !important;
  z-index: 50 !important;
}

html.mobile-mode .team-section {
  overflow: visible !important;
  position: relative !important;
}

html.mobile-mode .second-section {
  overflow: visible !important;
  position: relative !important;
}

/* ════════════════════════════════════════════════
   HERO CHEVRON
   ════════════════════════════════════════════════ */
html.mobile-mode #heroChevron {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) rotate(45deg) !important;
  z-index: 1500 !important;
  width: 18px !important;
  height: 18px !important;
  opacity: 1 !important;
  border-right: 2px solid rgba(245, 216, 0, 0.85) !important;
  border-bottom: 2px solid rgba(245, 216, 0, 0.85) !important;
  filter: drop-shadow(0 0 6px rgba(245, 216, 0, 0.9)) drop-shadow(0 0 14px rgba(245, 216, 0, 0.5)) !important;
}

html.mobile-mode #heroChevron.hide {
  opacity: 0 !important;
}

/* ════════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════════ */

/* Navbar: fixed to viewport at all times, above every section */
html.mobile-mode .navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 60px !important;
  padding: 0 20px !important;
  align-items: center !important;
  background: rgba(8, 6, 26, 0.92) !important;
  backdrop-filter: blur(14px) !important;
  z-index: 2000 !important;
}

/* Logo: top-left, strip the desktop stage offsets */
html.mobile-mode .logo-img {
  width: 68px !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
}

/* Hamburger: push to the far right, own z-index above everything */
html.mobile-mode .nav-toggle {
  display: flex !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  z-index: 2100 !important;
}

/* Collapse the <nav> wrapper so it takes no flex space. */
html.mobile-mode header nav {
  width: 0 !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.mobile-mode .nav-links {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 44px !important;
  margin: 0 !important;
  background: rgba(8, 6, 26, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  transform: translateX(100%) !important;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1050 !important;
  pointer-events: none !important;
}

html.mobile-mode .nav-links.open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

html.mobile-mode .nav-links a { font-size: 1.8rem !important; }

/* ════════════════════════════════════════════════
   HERO SECTION — 390×844 canvas
   ════════════════════════════════════════════════ */

html.mobile-mode .hero-container {
  overflow: hidden !important;
}

html.mobile-mode .hero-stage {
  width: 390px !important;
  height: 844px !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -195px !important;
  transform-origin: top center !important;
  /* scale is applied by JS */
}

html.mobile-mode .hero-stage .hero-content {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 24px 0 !important;
  margin-top: 0 !important;
  gap: 0 !important;
  height: 844px !important;
  width: 390px !important;
  flex-wrap: nowrap !important;
  position: relative !important;
}

/* Mascot — fixed position within 390px canvas */
html.mobile-mode .hero-stage .hero-left-mascot {
  width: 215px !important;
  min-width: 0 !important;
  flex-shrink: 0 !important;
  transform: none !important;
  order: 1 !important;
  margin-bottom: 0 !important;
  align-self: flex-start !important;
  margin-left: -24px !important;
  margin-top: -5px !important;
}

html.mobile-mode .hero-stage .hero-left-mascot img {
  width: 215px !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
}

/* Title + checkout text — overlapping mascot */
html.mobile-mode .hero-stage .hero-center-text {
  margin-left: 0 !important;
  margin-top: -155px !important;
  text-align: center !important;
  align-items: center !important;
  order: 2 !important;
  transform: none !important;
  transform-origin: unset !important;
  width: auto !important;
  flex: unset !important;
}

html.mobile-mode .hero-stage .title-img {
  width: 165px !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  margin-top: 0 !important;
  margin-left: 125px !important;
}

html.mobile-mode .hero-stage .checkout-wrapper {
  justify-content: flex-start !important;
  margin-left: 130px !important;
  margin-top: -12px !important;
}

html.mobile-mode .hero-stage .checkout-img {
  width: 175px !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
}

html.mobile-mode .hero-stage .doodle-arrow {
  display: none !important;
}

/* Carousel — positioned within 390px canvas */
html.mobile-mode .hero-stage .carousel-section {
  display: block !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 390px !important;
  height: 300px !important;
  margin: 170px 0 0 !important;
  order: 3 !important;
  transform: scale(1.25) !important;
  transform-origin: top center !important;
}

html.mobile-mode .hero-stage #hero-carousel {
  position: relative !important;
  width: 390px !important;
  height: 300px !important;
}

html.mobile-mode .hero-stage .carousel-card {
  left: 50% !important;
  right: auto !important;
}

html.mobile-mode .hero-stage .carousel-arrow {
  top: 100px !important;
  width: 32px !important;
  height: 32px !important;
}
html.mobile-mode .hero-stage .carousel-arrow-left  { left: 43px !important; }
html.mobile-mode .hero-stage .carousel-arrow-right { right: 43px !important; }

/* ── Project Info (under carousel) ── */
html.mobile-mode .hero-stage .project-info {
  display: block !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 390px !important;
  order: 4 !important;
  padding: 10px 20px 0 !important;
  box-sizing: border-box !important;
  text-align: left !important;
  border-top: none !important;
  border-bottom: none !important;
  margin-left: 80px !important;
  margin-top: -25px !important;
}

html.mobile-mode .project-name    { font-size: 18px !important; line-height: 1.2 !important; }
html.mobile-mode .project-details { font-size: 14px !important; margin: 2px 0 6px !important; }
html.mobile-mode .project-tags    { font-size: 13px !important; gap: 6px !important; flex-wrap: wrap !important; margin-left: -210px !important; }

/* ════════════════════════════════════════════════
   WORKS SECTION — 390×844 canvas
   ════════════════════════════════════════════════ */
html.mobile-mode .second-section {
  overflow: visible !important;
  margin-top: 175px !important;
}

html.mobile-mode .second-stage {
  width: 390px !important;
  height: 844px !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -195px !important;
  transform-origin: top center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 80px 20px 50px !important;
  gap: 28px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

html.mobile-mode .second-stage .key-bar {
  position: absolute !important;
  top: 205px !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 0 !important;
  gap: 8px !important;
  width: 390px !important;
  justify-content: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

html.mobile-mode .second-stage .keyboard-btn {
  width: 105px !important;
  max-width: unset !important;
  order: unset !important;
}

html.mobile-mode .second-stage .content-display-wrapper {
  display: flex !important;
  flex-direction: column !important;
  width: 390px !important;
  max-width: none !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  margin: 220px auto 0 !important;
  margin-left: -20px !important;
  gap: 16px !important;
  flex: unset !important;
  overflow: visible !important;
}

html.mobile-mode .second-stage .slider-outer-container {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 350px !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  order: unset !important;
}

html.mobile-mode .second-stage .slider-main-box {
  width: 350px !important;
  height: auto !important;
}

html.mobile-mode .second-stage .slider-main-img {
  width: 350px !important;
  height: auto !important;
  display: block !important;
}

/* Hide slider arrows on mobile — replaced by swipe */
html.mobile-mode .slider-arrow {
  display: none !important;
}

/* Explore button hotspot */
html.mobile-mode #explore-link {
  top: 89% !important;
  bottom: auto !important;
  right: 5% !important;
  width: 35% !important;
  height: 10% !important;
}

/* Works mascot */
html.mobile-mode .second-stage .mascot-container {
  display: block !important;
  position: absolute !important;
  top: -130px !important;
  right: 38px !important;
  left: auto !important;
  width: 299px !important;
  margin: 0 !important;
  z-index: 100 !important;
  overflow: visible !important;
}

html.mobile-mode .second-stage .mascot-img {
  width: 299px !important;
  height: auto !important;
}

html.mobile-mode .second-stage .speech-bubble {
  position: absolute !important;
  top: -70px !important;
  left: -15px !important;
  width: 85px !important;
}

html.mobile-mode .second-stage .bubble-text {
  font-size: 10px !important;
}

/* ════════════════════════════════════════════════
   TEAM SECTION — 390×844 canvas
   ════════════════════════════════════════════════ */
html.mobile-mode .team-section {
  overflow: visible !important;
}

html.mobile-mode .team-stage {
  width: 390px !important;
  height: 844px !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -415px !important;
  margin-top: 155px !important;
  transform-origin: top center !important;
  padding: 80px 0 60px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

html.mobile-mode .team-header {
  position: absolute !important;
  top: 20px !important;
  left: 0 !important;
  right: 0 !important;
  text-align: center !important;
  margin: 0 !important;
}

/* ── Team Slider: mobile peek layout ── */
html.mobile-mode .team-slider-wrapper {
  position: absolute !important;
  top: 120px !important;
  left: 0 !important;
  right: 0 !important;
  overflow: visible !important;
  width: 390px !important;
  max-width: none !important;
  margin: 0 !important;
}

html.mobile-mode .team-slider {
  height: 400px !important;
  transform: none !important;
  overflow: visible !important;
}

html.mobile-mode .team-slot {
  width: 240px !important;
  transition: left 0.4s ease-out, transform 0.4s ease-out;
}
html.mobile-mode .team-card {
  width: 240px !important;
  clip-path: none !important;
  overflow: visible !important;
}

html.mobile-mode .pos-2 {
  z-index: 50 !important;
  overflow: visible !important;
}

/* Center card: taller avatar, centered and lowered */
html.mobile-mode .pos-2 .avatar-box {
  height: 270px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-top: 25px !important;
  z-index: 200 !important;
  overflow: visible !important;
  position: relative !important;
}

@keyframes avatarBreatheM {
  0%, 100% { transform: scale(1.3) translateY(0px); }
  50%       { transform: scale(1.35) translateY(-10px); }
}

html.mobile-mode .pos-2 .avatar-box img {
  animation: avatarBreatheM 3s ease-in-out infinite;
  z-index: 200 !important;
  position: relative !important;
}

/* Slot positions — center + two edge peeks */
html.mobile-mode .pos-0 { left: -150% !important; }
html.mobile-mode .pos-1 {
  left: -230px !important;
  transform: translateY(-50%) !important;
}
html.mobile-mode .pos-2 {
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}
html.mobile-mode .pos-3 {
  left: calc(100% - 10px) !important;
  transform: translateY(-50%) !important;
}
html.mobile-mode .pos-4 { left: 150% !important; }

/* Side cards — consistent size for all members */
html.mobile-mode .team-slot:not(.pos-2) .team-card {
  transform: scale(0.85) !important;
}
html.mobile-mode .team-slot:not(.pos-2) .avatar-box {
  height: 220px !important;
}
html.mobile-mode .team-slot:not(.pos-2) .avatar-box img {
  height: 100% !important;
  width: auto !important;
  object-fit: contain !important;
}
html.mobile-mode .pos-2 .team-card-bg {
  height: 130% !important;
  transform: translateY(-20%) !important;
}
html.mobile-mode .team-slot:not(.pos-2) .team-card-bg {
  height: 90% !important;
}

/* Nameslip */
html.mobile-mode .team-nameslip {
  width: 110% !important;
  z-index: 300 !important;
  position: relative !important;
  margin-left: -11.5px !important;
}

html.mobile-mode .nameslip-box {
  z-index: 300 !important;
  position: relative !important;
  overflow: visible !important;
}

/* Per-member avatar adjustments — center only */
html.mobile-mode .pos-2 .team-card[data-member="KESHAV PURUSHOT"] .avatar-box {
  margin-top: -80px !important;
  clip-path: inset(-200px -200px 0 -200px) !important;
}
html.mobile-mode .pos-2 .team-card[data-member="SARAH"] .avatar-box {
  margin-top: -80px !important;
  clip-path: inset(-200px -200px 0 -200px) !important;
}
@keyframes avatarBreatheSusheel {
  0%, 100% { transform: scale(1.45) translateY(0px); }
  50%       { transform: scale(1.5) translateY(-10px); }
}

html.mobile-mode .pos-2 .team-card[data-member="ANKIT"] .avatar-box {
  margin-top: -80px !important;
}
html.mobile-mode .pos-2 .team-card[data-member="SUSHEEL NATH"] .avatar-box {
  margin-top: -80px !important;
}
html.mobile-mode .pos-2 .team-card[data-member="SUSHEEL NATH"] .avatar-box img {
  animation: avatarBreatheSusheel 3s ease-in-out infinite !important;
}

/* Nav arrows: hidden on mobile — replaced by swipe */
html.mobile-mode .team-nav-btn {
  display: none !important;
}

/* ════════════════════════════════════════════════
   SURVEY SECTION — 390×844 canvas
   ════════════════════════════════════════════════ */
html.mobile-mode .survey-section {
  overflow: visible !important;
  z-index: 50 !important;
  position: relative !important;
}

html.mobile-mode .survey-stage {
  width: 390px !important;
  height: 844px !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -390px !important;
  margin-top: -25px !important;
  z-index: 50 !important;
  overflow: visible !important;
  transform-origin: top center !important;
  flex-direction: column !important;
  gap: 24px !important;
  padding: 30px 20px 50px !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

html.mobile-mode .survey-mascot-container {
  width: 230px !important;
  max-width: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  z-index: 100 !important;
  position: relative !important;
  overflow: visible !important;
}

html.mobile-mode .survey-bubble {
  position: relative !important;
  z-index: 101 !important;
  overflow: visible !important;
  top: 50px !important;
}

html.mobile-mode .survey-content-box {
  width: 350px !important;
  max-width: none !important;
}

html.mobile-mode .survey-desktop-content { display: none !important; }

html.mobile-mode .survey-content-img { width: 350px !important; display: block !important; }

html.mobile-mode .survey-frame-wrapper {
  display: block !important;
  position: relative !important;
  width: 350px !important;
}
html.mobile-mode .survey-inner-content {
  position: absolute !important;
  top: 5% !important;
  left: 5% !important;
  width: 90% !important;
  height: 90% !important;
  object-fit: contain !important;
}

/* ════════════════════════════════════════════════
   CONTACT SECTION — 390×844 canvas
   ════════════════════════════════════════════════ */
html.mobile-mode .contact-section {
  overflow: hidden !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html.mobile-mode .contact-stage {
  width: 390px !important;
  height: 400px !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -390px !important;
  margin-top: 0 !important;
  transform-origin: top center !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  gap: 0 !important;
  box-sizing: border-box !important;
  min-height: unset !important;
}

/* Contact mascot container: full-stage overlay */
html.mobile-mode .contact-mascot-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 390px !important;
  max-width: none !important;
  margin: 0 !important;
  transform: none !important;
  pointer-events: none !important;
}

/* Hearts — fixed position in 390px canvas */
html.mobile-mode .heart-container {
  position: absolute !important;
  top: 300px !important;
  left: 80px !important;
  transform: scale(1.9) !important;
  transform-origin: top left !important;
  pointer-events: auto !important;
}

/* "Join Us" bubble */
@keyframes contactBubbleFloat {
  0%, 100% { transform: translateX(40px) translateY(0px); }
  50%       { transform: translateX(40px) translateY(-12px); }
}

html.mobile-mode .community-bubble {
  position: absolute !important;
  top: 230px !important;
  left: 180px !important;
  width: 130px !important;
  pointer-events: auto !important;
  animation: contactBubbleFloat 3s ease-in-out infinite !important;
}

/* Mascot character — fixed position in 390px canvas */
@keyframes contactMascotFloat {
  0%, 100% { transform: translateX(-120px) translateY(0px); }
  50%       { transform: translateX(-120px) translateY(-12px); }
}

html.mobile-mode .community-mascot {
  position: absolute !important;
  top: 290px !important;
  left: 180px !important;
  width: 160px !important;
  pointer-events: auto !important;
  animation: contactMascotFloat 3s ease-in-out infinite !important;
}

html.mobile-mode .contact-grid-box {
  position: absolute !important;
  top: 540px !important;
  left: -36.5px !important;
  right: 0 !important;
  width: 380px !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  height: auto !important;
  background:
    linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(30, 16, 68, 0.6) 0%, rgba(8, 6, 26, 0.9) 100%) !important;
  background-size: 40px 40px, 40px 40px, 100% 100% !important;
  border: 3px solid #9b5de5 !important;
  border-radius: 24px !important;
}

/* Hide decorative vectors and title on mobile */
html.mobile-mode .contact-vector-tr,
html.mobile-mode .contact-vector-bl { display: none !important; }
html.mobile-mode .monki-form-title { display: none !important; }

html.mobile-mode .monki-form {
  width: 100% !important;
  padding: 140px 20px 20px !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}

html.mobile-mode .monki-form-row {
  flex-direction: column !important;
  gap: 16px !important;
}

html.mobile-mode .monki-input {
  width: 100% !important;
  background: #FEFAC5 !important;
  border: 2px solid #b8b830 !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  font-size: 16px !important;
  box-sizing: border-box !important;
}

html.mobile-mode .monki-textarea {
  min-height: 220px !important;
  resize: none !important;
}

/* Replace image submit button with styled yellow button */
html.mobile-mode .monki-submit {
  width: 100% !important;
  background: #f5d800 !important;
  border: 2px solid #b8b830 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  cursor: pointer !important;
  margin-top: 4px !important;
}

html.mobile-mode .submit-btn-img {
  display: none !important;
}

html.mobile-mode .monki-submit::after {
  content: 'Submit' !important;
  font-family: var(--font-body) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #4a4a00 !important;
}

html.mobile-mode .footer-area { display: none !important; }
